Class ArcChart


  • public class ArcChart
    extends Chart
    A simple pie chart.

    The values do not have to be in percentage; the percentage is computed based on the series values. If the user clicks on the slice, a popup shows the corresponding value. By setting the legendValueSuffix to "%", the value displayed will be the percentage instead of the serie's value.
    • Field Detail

      • selectedSeries

        public int selectedSeries
        Specifies the selected pie.
      • legendValueSuffix

        public java.lang.String legendValueSuffix
        The suffix used in the legend to display the values. E.G.: "%". Defaults to blank.
      • showValuesOnLegend

        public boolean showValuesOnLegend
        Set to true to show the values in the legend.
      • fillPerc

        public int fillPerc
        The percentage of the filled circle.
      • borderGap

        public int borderGap
        A gap between the chart and the borders
    • Constructor Detail

      • ArcChart

        public ArcChart()
        Creates a new Pie chart. The yDecimalPlaces defines the number of decimal places used to display the value in the legend.
    • Method Detail

      • onPaint

        public void onPaint​(Graphics g)
        Description copied from class: Control
        Called to draw the control. When this method is called, the graphics object passed has been translated into the coordinate system of the control and the area behind the control has already been painted.
        Overrides:
        onPaint in class Control
        Parameters:
        g - the graphics object for drawing
        See Also:
        Graphics
      • onEvent

        public void onEvent​(Event e)
        Description copied from class: Control
        Called to process key, pen, control and other posted events.
        Overrides:
        onEvent in class Control
        Parameters:
        e - the event to process
        See Also:
        Event, KeyEvent, PenEvent
      • onFontChanged

        public void onFontChanged()
        Description copied from class: Control
        Called after a setFont
        Overrides:
        onFontChanged in class Control