Package org.krysalis.jcharts.chartData.interfaces

Examples of org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries


    {
      String[] xAxisLabels = {"1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004"};
      String xAxisTitle = "Years";
      String yAxisTitle = "Problems";
      String title = "Micro$oft At Work";
      IAxisDataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

      double[][] data = new double[][]{{1500, 6880, 4510, 2600, 1200, 1580, 8000, 4555, 4000, 6120}};
      String[] legendLabels = {"Bugs"};
      Paint[] paints = new Paint[]{Color.blue.darker()};
      Paint[] linePaints = new Paint[]{Color.green};
      dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, this.barChartProperties ) );
      dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data, legendLabels, linePaints, ChartType.LINE, this.lineChartProperties ) );

      AxisChart axisChart = new AxisChart( dataSeries, this.chartProperties, this.axisProperties, this.legendProperties, this.width, this.height );
      ServletEncoderHelper.encodeJPEG13( axisChart, 1.0f, httpServletResponse );
    }
    catch( Throwable throwable )
View Full Code Here


    {
      String[] xAxisLabels = {"1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004"};
      String xAxisTitle = "Years";
      String yAxisTitle = "Problems";
      String title = "Micro$oft At Work";
      IAxisDataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

      double[][] data = new double[][]{{1500, 6880, 4510, 2600, -1200, -1580, 7000, 4555, 4000, 6120}};
      String[] legendLabels = {"Bugs"};
      Paint[] paints = new Paint[]{Color.yellow};
      dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, this.barChartProperties ) );

      AxisChart axisChart = new AxisChart( dataSeries, this.chartProperties, this.axisProperties, this.legendProperties, this.width, this.height );
      ServletEncoderHelper.encodeJPEG13( axisChart, 1.0f, httpServletResponse );
    }
    catch( Throwable throwable )
View Full Code Here

    Paint[] paints = {Color.yellow, Color.blue };
    String[] legendLabels = {"Test Legend Label", "second set"};
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR_STACKED, stackedBarChartProperties );

    String[] axisLabels = {"1900", "1950", "2000", "2050", "3000", "3050", "4000", "4050" };
    IAxisDataSeries dataSeries = new DataSeries( axisLabels, "Cookies", "Years", null );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );


    ChartProperties chartProperties = new ChartProperties();
    AxisProperties axisProperties = new AxisProperties( false );
View Full Code Here

    Paint[] paints = {Color.yellow, Color.blue };
    String[] legendLabels = {"Test Legend Label", "other data"};
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties );

    String[] axisLabels = {"1900", "1950", "2000", "2050"};
    IAxisDataSeries dataSeries = new DataSeries( axisLabels, "Cookies", "Years", null );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );


    ChartProperties chartProperties = new ChartProperties();
    AxisProperties axisProperties = new AxisProperties( false );
View Full Code Here

    this.paints = new ArrayList();


    if( iData instanceof IAxisDataSeries )
    {
      IAxisDataSeries iAxisDataSeries = (IAxisDataSeries) iData;
      this.processData( iAxisDataSeries );
      numberOfLabels = iAxisDataSeries.getTotalNumberOfDataSets();
    }
    else
    {
      IPieChartDataSet iPieChartDataSet = (IPieChartDataSet) iData;
      this.processData( iPieChartDataSet );
View Full Code Here

      String legendLabel1 = "Legend Label 1";
      String legendLabel2 = "Legend Label 2";
      String legendLabel3 = "Legend Label 3";

      //IAxisDataSeries dataSeries = new DataSeries( xAxisLabels, null, null, title );
      IAxisDataSeries dataSeries = new DataSeries( xAxisLabels, "X Axis title", "Left Y Axis title", title );

      String[] legendLabelsClust = {legendLabel1, legendLabel2};
      Paint[] clustPaints = new Paint[]{Color.pink, Color.blue};

      String[] legendLabelsLine = {legendLabel3};
      Paint[] linePaints = new Paint[]{Color.green};

      //------------On r�cup�re une 2�me �chelle "secondScale"------------------
      //------------et on fait un traitement pour les nombres n�gatifs----------
      //------------We get back the 2nd scale "secondScale"---------------------
      //-------------and we handle the negative numbers---------------------
     //On identifie la valeur maximum absolue des data Clustered Bar
      //et on compte le nombre de z�ro et le nombre de chiffres n�gatifs
      // We identify the absolute maximum value of the data in the Clustered Bar
      // and we count the number of zero and negative digits
      for (int k=0; k<2; k++) {

        for (int j=0; j<xAxisLabels.length; j++) {
          if (maxDataClustAbs < (Math.abs(dataClust[k][j])) && (dataClust[k][j]!=0) ) {
            maxDataClustAbs=(Math.abs(dataClust[k][j]));
          }
          if (dataClust[k][j]<0) {
            numberOfNegativ+=1;
          }
          if (dataClust[k][j]==0) {
            numberOfZero+=1
          }
        }
      }

      //On identifie la valeur maximum absolue des data Line
      //et on compte le nombre de z�ro et le nombre de chiffres n�gatifs
      // We identify the absolute maximum value of the data lines
      // and we count the number of zero and negative digits
      for (int j=0; j<xAxisLabels.length; j++) {
        if (maxDataLineAbs < (Math.abs(dataLine[0][j])) && (dataLine[0][j]!=0) ) {
          maxDataLineAbs=(Math.abs(dataLine[0][j]));
        }
        if (dataLine[0][j]<0) {
            numberOfNegativ+=1;
        }
        if (dataLine[0][j]==0) {
            numberOfZero+=1
        }
      }

      //On d�finit la valeur de la seconde �chelle si les ordres de grandeurs
      //sont tr�s diff�rent (de l'ordre de 10).
      //We define the value of the second scale if the increment is an order of
      //magnitude greater
      if (maxDataClustAbs>10*maxDataLineAbs) {   
        axisProperties.getYAxisProperties().setShowRightAxis(true);
        secondScale=Math.round(maxDataClustAbs/(maxDataLineAbs));
        axisProperties.getYAxisProperties().setSecondScaleRight((float) (secondScale) );
        ChartFont axisScaleFontRight = new ChartFont( new Font("Arial Narrow", Font.PLAIN, 10), Color.green.darker() );
        axisProperties.getYAxisProperties().setScaleChartFontRight( axisScaleFontRight );
      }

      //On v�rifie s'il y a des valeurs n�gatives
      // Check if there are negative numbers
      if (numberOfNegativ>0) {
        if ((maxDataLineAbs*secondScale)>maxDataClustAbs) {
          axisProperties.getYAxisProperties().setMinRightAxis((double) (-maxDataLineAbs*secondScale));
          //Si les valeurs ne sont pas toutes n�gatives on affiche l'axe des ordonn�es
          //de mani�re a ce que le z�ro soit centr�
          // If the numbers are not all negative we center the ordinal axis around zero
          if (numberOfNegativ!=(3*xAxisLabels.length-numberOfZero)) {
            axisProperties.getYAxisProperties().setMaxRightAxis((double) (maxDataLineAbs*secondScale));
          }
        } else {
          axisProperties.getYAxisProperties().setMinRightAxis((double) (-maxDataClustAbs));
            if (numberOfNegativ!=(3*xAxisLabels.length-numberOfZero)) {
              axisProperties.getYAxisProperties().setMaxRightAxis((double) (maxDataClustAbs));
            }
        }
      }

      dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( dataClust, legendLabelsClust, clustPaints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties ) );
      dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( dataLine, legendLabelsLine, linePaints, ChartType.LINE, lineChartProperties ) );
      AxisChart axisChart = new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, width, height );
      ServletEncoderHelper.encodeJPEG13( axisChart, 1.0f, httpServletResponse );
    }
    catch( Throwable throwable ) {
View Full Code Here

    {
      String[] xAxisLabels = {"1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004"};
      String xAxisTitle = "Years";
      String yAxisTitle = "Problems";
      String title = "Micro$oft At Work";
      IAxisDataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

      double[][] data = new double[][]{{1500, 6880, 4510, 2600, 1200, 1580, 8000, 4555, 4000, 6120}};
      String[] legendLabels = {"Bugs"};
      Paint[] paints = new Paint[]{Color.blue.darker()};
      dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, this.barChartProperties ) );

      AxisChart axisChart = new AxisChart( dataSeries, this.chartProperties, this.axisProperties, this.legendProperties, this.width, this.height );

      //---this call will render the chart to an internal BufferedImage, creating all the image map coordinates
      axisChart.renderWithImageMap();
View Full Code Here

    Paint[] paints = {Color.yellow, Color.blue };
    String[] legendLabels = {"Test Legend Label", "second set"};
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.POINT, pointChartProperties );

    String[] axisLabels = {"1900", "1950", "2000", "2050", "3000", "3050", "4000", "4050" };
    IAxisDataSeries dataSeries = new DataSeries( axisLabels, "Cookies", "Years", null );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );


    ChartProperties chartProperties = new ChartProperties();
    AxisProperties axisProperties = new AxisProperties( false );
View Full Code Here

    String[] legendLabels = {"Test Legend Label"};
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, barChartProperties );

    String[] axisLabels = {"1900", "2000", "2010", "2050" };
    //String[] axisLabels = {"1900", "1910", "1920", "1930", "1940", "1950", "1960", "1970", "1980", "1990", "2000" };
    IAxisDataSeries dataSeries = new DataSeries( axisLabels, "Wonka Bars", "Years", "Oompa Loompa Productivity" );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );


    ChartProperties chartProperties = new ChartProperties();
    AxisProperties axisProperties = new AxisProperties( false );
View Full Code Here

    Paint[] paints = {Color.yellow, Color.blue };
    String[] legendLabels = {"Test Legend Label", "second set"};
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.POINT, pointChartProperties );

    String[] axisLabels = {"1900", "1950", "2000", "2050", "3000", "3050", "4000", "4050" };
    IAxisDataSeries dataSeries = new DataSeries( axisLabels, "Cookies", "Years", null );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );


    ChartProperties chartProperties = new ChartProperties();
    AxisProperties axisProperties = new AxisProperties( false );
View Full Code Here

TOP

Related Classes of org.krysalis.jcharts.chartData.interfaces.IAxisDataSeries

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.