# Class DialRenderer

java.lang.Object
com.codename1.charts.renderers.DefaultRenderer
com.codename1.charts.renderers.DialRenderer

public class DialRenderer extends DefaultRenderer
Dial chart renderer.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `DialRenderer.Type`

- ## Field Summary

  ### Fields inherited from class DefaultRenderer

  `BACKGROUND_COLOR, NO_COLOR, TEXT_COLOR`
  Modifier and Type
  Field
  Description
  `static final int`
  `BACKGROUND_COLOR`
  The default background color.
  `static final int`
  `NO_COLOR`
  A no color constant.
  `static final int`
  `TEXT_COLOR`
  The default color for text.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DialRenderer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `getAngleMax()`
  Returns the end angle value of the dial.
  `double`
  `getAngleMin()`
  Returns the start angle value of the dial.
  `double`
  `getMajorTicksSpacing()`
  Returns the major ticks spacing.
  `double`
  `getMaxValue()`
  Returns the end value to be rendered on the dial.
  `double`
  `getMinorTicksSpacing()`
  Returns the minor ticks spacing.
  `double`
  `getMinValue()`
  Returns the start value to be rendered on the dial.
  `DialRenderer.Type`
  `getVisualTypeForIndex(int index)`
  Returns the visual type at the specified index.
  `boolean`
  `isMaxValueSet()`
  Returns if the maximum dial value was set.
  `boolean`
  `isMinValueSet()`
  Returns if the minimum dial value was set.
  `void`
  `setAngleMax(double max)`
  Sets the end angle value of the dial.
  `void`
  `setAngleMin(double min)`
  Sets the start angle value of the dial.
  `void`
  `setMajorTicksSpacing(double spacing)`
  Sets the major ticks spacing.
  `void`
  `setMaxValue(double max)`
  Sets the end value to be rendered on the dial.
  `void`
  `setMinorTicksSpacing(double spacing)`
  Sets the minor ticks spacing.
  `void`
  `setMinValue(double min)`
  Sets the start value to be rendered on the dial.
  `void`
  `setVisualTypes(DialRenderer.Type[] types)`
  Sets the visual types.

  ### Methods inherited from class DefaultRenderer

  `addSeriesRenderer, addSeriesRenderer, getAxesColor, getBackgroundColor, getChartTitle, getChartTitleTextSize, getLabelsColor, getLabelsTextSize, getLegendHeight, getLegendTextSize, getMargins, getOriginalScale, getScale, getSelectableBuffer, getSeriesRendererAt, getSeriesRendererCount, getSeriesRenderers, getStartAngle, getTextTypeface, getTextTypefaceName, getTextTypefaceStyle, getXAxisColor, getYAxisColor, getZoomRate, isAntialiasing, isApplyBackgroundColor, isClickEnabled, isDisplayValues, isExternalZoomEnabled, isFitLegend, isInScroll, isPanEnabled, isShowAxes, isShowCustomTextGridX, isShowCustomTextGridY, isShowGridX, isShowGridY, isShowLabels, isShowLegend, isShowTickMarks, isZoomButtonsVisible, isZoomEnabled, removeAllRenderers, removeSeriesRenderer, setAntialiasing, setApplyBackgroundColor, setAxesColor, setBackgroundColor, setChartTitle, setChartTitleTextFont, setChartTitleTextSize, setClickEnabled, setDisplayValues, setExternalZoomEnabled, setFitLegend, setInScroll, setLabelsColor, setLabelsTextFont, setLabelsTextSize, setLegendHeight, setLegendTextFont, setLegendTextSize, setMargins, setPanEnabled, setScale, setSelectableBuffer, setShowAxes, setShowCustomTextGrid, setShowCustomTextGridX, setShowCustomTextGridY, setShowGrid, setShowGridX, setShowGridY, setShowLabels, setShowLegend, setShowTickMarks, setStartAngle, setTextTypeface, setTextTypeface, setXAxisColor, setYAxisColor, setZoomButtonsVisible, setZoomEnabled, setZoomRate`
  Modifier and Type
  Method
  Description
  `void`
  `addSeriesRenderer(int index, SimpleSeriesRenderer renderer)`
  Adds a simple renderer to the multiple renderer.
  `void`
  `addSeriesRenderer(SimpleSeriesRenderer renderer)`
  Adds a simple renderer to the multiple renderer.
  `int`
  `getAxesColor()`
  Returns the axes color.
  `int`
  `getBackgroundColor()`
  Returns the background color.
  `String`
  `getChartTitle()`
  Returns the chart title.
  `float`
  `getChartTitleTextSize()`
  Returns the chart title text size.
  `int`
  `getLabelsColor()`
  Returns the labels color.
  `float`
  `getLabelsTextSize()`
  Returns the labels text size.
  `int`
  `getLegendHeight()`
  Returns the legend height.
  `float`
  `getLegendTextSize()`
  Returns the legend text size.
  `int[]`
  `getMargins()`
  Returns the margin sizes.
  `float`
  `getOriginalScale()`
  Returns the original value to be used for scaling the chart.
  `float`
  `getScale()`
  Returns the value to be used for scaling the chart.
  `int`
  `getSelectableBuffer()`
  Returns the selectable radius value around clickable points.
  `SimpleSeriesRenderer`
  `getSeriesRendererAt(int index)`
  Returns the simple renderer from the multiple renderer list.
  `int`
  `getSeriesRendererCount()`
  Returns the simple renderers count in the multiple renderer list.
  `SimpleSeriesRenderer[]`
  `getSeriesRenderers()`
  Returns an array of the simple renderers in the multiple renderer list.
  `float`
  `getStartAngle()`
  Returns the start angle for circular charts such as pie, doughnut.
  `Font`
  `getTextTypeface()`
  Returns the text typeface.
  `int`
  `getTextTypefaceName()`
  Returns the text typeface name.
  `int`
  `getTextTypefaceStyle()`
  Returns the text typeface style.
  `int`
  `getXAxisColor()`
  Returns the color of the X axis
  `int`
  `getYAxisColor()`
  Returns the color of the Y axis
  `float`
  `getZoomRate()`
  Returns the zoom rate.
  `boolean`
  `isAntialiasing()`
  Returns the antialiasing flag value.
  `boolean`
  `isApplyBackgroundColor()`
  Returns if the background color should be applied.
  `boolean`
  `isClickEnabled()`
  Returns the enabled state of the click.
  `boolean`
  `isDisplayValues()`
  Returns if the values should be displayed as text.
  `boolean`
  `isExternalZoomEnabled()`
  Returns the enabled state of the external (application implemented) zoom.
  `boolean`
  `isFitLegend()`
  Returns if the legend should size to fit.
  `boolean`
  `isInScroll()`
  Returns if the chart is inside a scroll view and doesn't need to shrink.
  `boolean`
  `isPanEnabled()`
  Returns the enabled state of the pan.
  `boolean`
  `isShowAxes()`
  Returns if the axes should be visible.
  `boolean`
  `isShowCustomTextGridX()`
  Returns if the X axis custom text grid should be visible.
  `boolean`
  `isShowCustomTextGridY()`
  Returns if the Y axis custom text grid should be visible.
  `boolean`
  `isShowGridX()`
  Returns if the X axis grid should be visible.
  `boolean`
  `isShowGridY()`
  Returns if the Y axis grid should be visible.
  `boolean`
  `isShowLabels()`
  Returns if the labels should be visible.
  `boolean`
  `isShowLegend()`
  Returns if the legend should be visible.
  `boolean`
  `isShowTickMarks()`
  Returns if the tick marks should be visible.
  `boolean`
  `isZoomButtonsVisible()`
  Returns the visible state of the zoom buttons.
  `boolean`
  `isZoomEnabled()`
  Returns the enabled state of the zoom.
  `void`
  `removeAllRenderers()`
  Removes all renderers from the multiple renderer.
  `void`
  `removeSeriesRenderer(SimpleSeriesRenderer renderer)`
  Removes a simple renderer from the multiple renderer.
  `void`
  `setAntialiasing(boolean antialiasing)`
  Sets the antialiasing value.
  `void`
  `setApplyBackgroundColor(boolean apply)`
  Sets if the background color should be applied.
  `void`
  `setAxesColor(int color)`
  Sets the axes color.
  `void`
  `setBackgroundColor(int color)`
  Sets the background color.
  `void`
  `setChartTitle(String title)`
  Sets the chart title.
  `void`
  `setChartTitleTextFont(Font font)`
  Sets the chart title font size using a Font object instead of a point size.
  `void`
  `setChartTitleTextSize(float textSize)`
  Sets the chart title text size in pixels.
  `void`
  `setClickEnabled(boolean enabled)`
  Sets the enabled state of the click.
  `void`
  `setDisplayValues(boolean display)`
  Sets if the values should be displayed as text (supported by pie chart).
  `void`
  `setExternalZoomEnabled(boolean enabled)`
  Sets the enabled state of the external (application implemented) zoom.
  `void`
  `setFitLegend(boolean fit)`
  Sets if the legend should size to fit.
  `void`
  `setInScroll(boolean inScroll)`
  To be set if the chart is inside a scroll view and doesn't need to shrink when not enough space.
  `void`
  `setLabelsColor(int color)`
  Sets the labels color.
  `void`
  `setLabelsTextFont(Font font)`
  Sets the label title font size using a Font object instead of a point size.
  `void`
  `setLabelsTextSize(float textSize)`
  Sets the labels text size.
  `void`
  `setLegendHeight(int height)`
  Sets the legend height, in pixels.
  `void`
  `setLegendTextFont(Font font)`
  Sets the legend text font size using a Font object instead of a point size.
  `void`
  `setLegendTextSize(float textSize)`
  Sets the legend text size.
  `void`
  `setMargins(int[] margins)`
  Sets the margins, in pixels.
  `void`
  `setPanEnabled(boolean enabled)`
  Sets the enabled state of the pan.
  `void`
  `setScale(float scale)`
  Sets the value to be used for scaling the chart.
  `void`
  `setSelectableBuffer(int buffer)`
  Sets the selectable radius value around clickable points.
  `void`
  `setShowAxes(boolean showAxes)`
  Sets if the axes should be visible.
  `void`
  `setShowCustomTextGrid(boolean showGrid)`
  Sets if the grid for custom X or Y labels should be visible.
  `void`
  `setShowCustomTextGridX(boolean showGrid)`
  Sets if the X axis custom text grid should be visible.
  `void`
  `setShowCustomTextGridY(boolean showGrid)`
  Sets if the Y axis custom text grid should be visible.
  `void`
  `setShowGrid(boolean showGrid)`
  Sets if the grid should be visible.
  `void`
  `setShowGridX(boolean showGrid)`
  Sets if the X axis grid should be visible.
  `void`
  `setShowGridY(boolean showGrid)`
  Sets if the Y axis grid should be visible.
  `void`
  `setShowLabels(boolean showLabels)`
  Sets if the labels should be visible.
  `void`
  `setShowLegend(boolean showLegend)`
  Sets if the legend should be visible.
  `void`
  `setShowTickMarks(boolean mShowTickMarks)`
  Sets if the tick marks should be visible.
  `void`
  `setStartAngle(float startAngle)`
  Sets the start angle for circular charts such as pie, doughnut, etc.
  `void`
  `setTextTypeface(int typefaceName, int style)`
  Sets the text typeface name and style.
  `void`
  `setTextTypeface(Font typeface)`
  Sets the text typeface.
  `void`
  `setXAxisColor(int color)`
  Sets the X axis color.
  `void`
  `setYAxisColor(int color)`
  Sets the Y axis color.
  `void`
  `setZoomButtonsVisible(boolean visible)`
  Sets the visible state of the zoom buttons.
  `void`
  `setZoomEnabled(boolean enabled)`
  Sets the enabled state of the zoom.
  `void`
  `setZoomRate(float rate)`
  Sets the zoom rate.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Constructor Details

  - ### DialRenderer

    public DialRenderer()

- ## Method Details

  - ### getAngleMin

    public double getAngleMin()

    Returns the start angle value of the dial.

    ###### Returns

    the angle start value

  - ### setAngleMin

    public void setAngleMin(double min)

    Sets the start angle value of the dial.

    ###### Parameters

    - `min`: the dial angle start value

  - ### getAngleMax

    public double getAngleMax()

    Returns the end angle value of the dial.

    ###### Returns

    the angle end value

  - ### setAngleMax

    public void setAngleMax(double max)

    Sets the end angle value of the dial.

    ###### Parameters

    - `max`: the dial angle end value

  - ### getMinValue

    public double getMinValue()

    Returns the start value to be rendered on the dial.

    ###### Returns

    the start value on dial

  - ### setMinValue

    public void setMinValue(double min)

    Sets the start value to be rendered on the dial.

    ###### Parameters

    - `min`: the start value on the dial

  - ### isMinValueSet

    public boolean isMinValueSet()

    Returns if the minimum dial value was set.

    ###### Returns

    the minimum dial value was set or not

  - ### getMaxValue

    public double getMaxValue()

    Returns the end value to be rendered on the dial.

    ###### Returns

    the end value on the dial

  - ### setMaxValue

    public void setMaxValue(double max)

    Sets the end value to be rendered on the dial.

    ###### Parameters

    - `max`: the end value on the dial

  - ### isMaxValueSet

    public boolean isMaxValueSet()

    Returns if the maximum dial value was set.

    ###### Returns

    the maximum dial was set or not

  - ### getMinorTicksSpacing

    public double getMinorTicksSpacing()

    Returns the minor ticks spacing.

    ###### Returns

    the minor ticks spacing

  - ### setMinorTicksSpacing

    public void setMinorTicksSpacing(double spacing)

    Sets the minor ticks spacing.

    ###### Parameters

    - `spacing`: the minor ticks spacing

  - ### getMajorTicksSpacing

    public double getMajorTicksSpacing()

    Returns the major ticks spacing.

    ###### Returns

    the major ticks spacing

  - ### setMajorTicksSpacing

    public void setMajorTicksSpacing(double spacing)

    Sets the major ticks spacing.

    ###### Parameters

    - `spacing`: the major ticks spacing

  - ### getVisualTypeForIndex

    public DialRenderer.Type getVisualTypeForIndex(int index)

    Returns the visual type at the specified index.

    ###### Parameters

    - `index`: the index

    ###### Returns

    the visual type

  - ### setVisualTypes

    public void setVisualTypes(DialRenderer.Type[] types)

    Sets the visual types.

    ###### Parameters

    - `types`: the visual types