Class PieChartDataSet

    • Field Detail

      • chartTitle

        private java.lang.String chartTitle
    • Constructor Detail

      • PieChartDataSet

        public PieChartDataSet​(java.lang.String chartTitle,
                               double[] data,
                               java.lang.String[] legendLabels,
                               java.awt.Paint[] paints,
                               PieChart2DProperties pieChart2DProperties)
                        throws ChartDataException
        Constructor
        Parameters:
        chartTitle - if the title is NULL, no title will be drawn
        data -
        legendLabels -
        paints -
        pieChart2DProperties -
        Throws:
        ChartDataException - if fails a limited validation check
    • Method Detail

      • validateData

        private void validateData​(double[] data,
                                  java.lang.String[] legendLabels,
                                  java.awt.Paint[] paints)
                           throws ChartDataException
        Perform some limited validation of the structure of the passed data. This is useful for development.
        Parameters:
        data -
        legendLabels -
        paints -
        Throws:
        ChartDataException
      • getChartTitle

        public java.lang.String getChartTitle()
        Returns the chart title.
        Specified by:
        getChartTitle in interface IPieChartDataSet
        Returns:
        String the chart title. If this returns NULL, no title will be displayed.
      • getValue

        public double getValue​(int index)
                        throws java.lang.ArrayIndexOutOfBoundsException
        Returns the value in the data set at the specified position.
        Specified by:
        getValue in interface IPieChartDataSet
        Parameters:
        index -
        Returns:
        double
        Throws:
        java.lang.ArrayIndexOutOfBoundsException