Examples of DataSeries


Examples of org.krysalis.jcharts.chartData.DataSeries

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

    double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  }, { 150, 15, 6, 62, -54, 10, 84  }, { 20, 145, 36, 6, 45, 18, } };
    String[] legendLabels= { "Bugs", "Security Holes", "Backdoors" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 3 );
    ClusteredBarChartProperties clusteredBarChartProperties= new ClusteredBarChartProperties();
    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    AxisProperties axisProperties= new AxisProperties();
    LegendProperties legendProperties= new LegendProperties();
    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );
View Full Code Here

Examples of org.krysalis.jcharts.chartData.DataSeries

  {
    String[] xAxisLabels= { "June 2", "June 3", "June 4", "June 5", "June 6", "June 7", "June 8" };
    String xAxisTitle= "Days";
    String yAxisTitle= "$$$";
    String title= "Id Software";
    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

    int dataSize= xAxisLabels.length;
      int numberOfDataSets= 1;


      StockChartDataSet stockChartDataSet;

    double[] highs= TestDataGenerator.getRandomNumbers( dataSize, 500, 1000 );
    double[] lows= TestDataGenerator.getRandomNumbers( dataSize, 100, 300 );
    double[] opens= TestDataGenerator.getRandomNumbers( dataSize, 350, 450 );
    double[] closes= TestDataGenerator.getRandomNumbers( dataSize, 350, 450 );

      StockChartProperties stockChartProperties= new StockChartProperties();

    stockChartDataSet= new StockChartDataSet( highs, "High", lows, "Low", Color.black, stockChartProperties );
    stockChartDataSet.setOpenValues( opens, "Open", Color.red );
    stockChartDataSet.setCloseValues( closes, "Close", Color.green );

    dataSeries.addIAxisPlotDataSet( stockChartDataSet );



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

Examples of org.krysalis.jcharts.chartData.DataSeries

  {
    String[] xAxisLabels= { "June 2", "June 3", "June 4", "June 5", "June 6", "June 7", "June 8" };
    String xAxisTitle= "Days";
    String yAxisTitle= "$$$";
    String title= "Id Software";
    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

    int dataSize= xAxisLabels.length;
      int numberOfDataSets= 1;


      StockChartDataSet stockChartDataSet;

    double[] highs= TestDataGenerator.getRandomNumbers( dataSize, 500, 1000 );
    double[] lows= TestDataGenerator.getRandomNumbers( dataSize, 100, 300 );
    double[] opens= TestDataGenerator.getRandomNumbers( dataSize, 350, 450 );
    double[] closes= TestDataGenerator.getRandomNumbers( dataSize, 350, 450 );

      StockChartProperties stockChartProperties= new StockChartProperties();
    stockChartProperties.setHiLowStroke( new BasicStroke( 3.0f ) );
    stockChartProperties.setCloseStroke( new BasicStroke( 2.5f ) );

    stockChartDataSet= new StockChartDataSet( highs, "High", lows, "Low", Color.black, stockChartProperties );
    stockChartDataSet.setOpenValues( opens, "Open", Color.red );
    stockChartDataSet.setCloseValues( closes, "Close", Color.green );

    dataSeries.addIAxisPlotDataSet( stockChartDataSet );

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

Examples of org.krysalis.jcharts.chartData.DataSeries

  {
    String[] xAxisLabels= { "June 2", "June 3", "June 4", "June 5", "June 6", "June 7", "June 8" };
    String xAxisTitle= "Days";
    String yAxisTitle= "$$$";
    String title= "Id Software";
    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

    int dataSize= xAxisLabels.length;
      int numberOfDataSets= 1;


      StockChartDataSet stockChartDataSet;

    double[] highs= TestDataGenerator.getRandomNumbers( dataSize, 500, 1000 );
    double[] lows= TestDataGenerator.getRandomNumbers( dataSize, 100, 300 );
    double[] opens= TestDataGenerator.getRandomNumbers( dataSize, 350, 450 );
    double[] closes= TestDataGenerator.getRandomNumbers( dataSize, 350, 450 );

      StockChartProperties stockChartProperties= new StockChartProperties();
    stockChartProperties.setOpenPixelLength( 10 );
    stockChartProperties.setClosePixelLength( 20 );

    stockChartDataSet= new StockChartDataSet( highs, "High", lows, "Low", Color.black, stockChartProperties );
    stockChartDataSet.setOpenValues( opens, "Open", Color.red );
    stockChartDataSet.setCloseValues( closes, "Close", Color.green );

    dataSeries.addIAxisPlotDataSet( stockChartDataSet );

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

Examples of org.krysalis.jcharts.chartData.DataSeries

    String[] legendLabels= { "Bugs", "Security Holes", "Backdoors" };
    AreaChartProperties areaChartProperties= new AreaChartProperties();
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.AREA, areaChartProperties );

    String[] xAxisLabels= { "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004" };
    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Incidence", "Micro$oft At Work"  );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    chartProperties.setEdgePadding( 20 );
    chartProperties.setTitleFont( new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black ) );
View Full Code Here

Examples of org.krysalis.jcharts.chartData.DataSeries

    String[] legendLabels= { "Bugs", "Security Holes", "Backdoors" };
    StackedAreaChartProperties stackedAreaChartProperties= new StackedAreaChartProperties();
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.AREA_STACKED, stackedAreaChartProperties );

    String[] xAxisLabels= { "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004" };
    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Incidence", "Micro$oft At Work"  );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    chartProperties.setEdgePadding( 20 );
    chartProperties.setTitleFont( new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black ) );
View Full Code Here

Examples of org.krysalis.jcharts.chartData.DataSeries

      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

Examples of org.krysalis.jcharts.chartData.DataSeries

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

    double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  }, { 150, 15, 6, 62, -54, 10, 84  } };
    String[] legendLabels= { "Bugs", "Security Holes" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 2 );

    Shape[] shapes= { PointChartProperties.SHAPE_DIAMOND, PointChartProperties.SHAPE_TRIANGLE };
    boolean[] fillPointFlags= { true, true };
    Paint[] outlinePaints= { Color.black, Color.black };
    PointChartProperties pointChartProperties= new PointChartProperties( shapes, fillPointFlags, outlinePaints );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.POINT, pointChartProperties );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

Examples of org.krysalis.jcharts.chartData.DataSeries

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


    double[][] data= TestDataGenerator.getRandomNumbers( 1, 7, 0, 6000 );
    String[] legendLabels= { "Bugs" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 1 );

    Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE };
    boolean[] fillPointFlags= { false };
    Paint[] outlinePaints= { Color.red };
    PointChartProperties pointChartProperties= new PointChartProperties( shapes, fillPointFlags, outlinePaints );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.POINT, pointChartProperties );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

Examples of org.krysalis.jcharts.chartData.DataSeries

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


    double[][] data= TestDataGenerator.getRandomNumbers( 1, 7, 0, 6000 );
    data[ 0 ][ 3 ]= Double.NaN;
    data[ 0 ][ 4 ]= Double.NaN;

    String[] legendLabels= { "Bugs" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 1 );

    Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE };
    boolean[] fillPointFlags= { true };
    Paint[] outlinePaints= { Color.black };
    PointChartProperties pointChartProperties= new PointChartProperties( shapes, fillPointFlags, outlinePaints );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.POINT, pointChartProperties );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    AxisProperties axisProperties= new AxisProperties();
    LegendProperties legendProperties= new LegendProperties();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.