Package org.krysalis.jcharts.chartData

Examples of org.krysalis.jcharts.chartData.DataSeries


  /********************************************************************************************/
  private void chartTitle() throws Throwable
  {
    String[] xAxisLabels= { "1998", "1999", "2000", "2001", "2002", "2003", "2004" };
    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Production", "Micro$oft Bug Production" );
    dataSeries.addIAxisPlotDataSet( AxisChartsGuide.createAxisChartDataSet( ChartType.AREA, new AreaChartProperties(), 200, 5000 ) );

    ChartProperties chartProperties= this.getChartProperties();

    AxisProperties axisProperties= new AxisProperties();
    axisProperties.setXAxisLabelsAreVertical( true );
View Full Code Here


  /********************************************************************************************/
  private void chartNoTitle() throws Throwable
  {
    String[] xAxisLabels= { "1998", "1999", "2000", "2001", "2002", "2003", "2004" };
    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Production", null );
    dataSeries.addIAxisPlotDataSet( AxisChartsGuide.createAxisChartDataSet( ChartType.AREA, new AreaChartProperties(), 200, 5000 ) );

    ChartProperties chartProperties= this.getChartProperties();

    AxisProperties axisProperties= new AxisProperties();
    axisProperties.setXAxisLabelsAreVertical( true );
View Full Code Here

  /********************************************************************************************/
  private void chartTitleWrapping() throws Throwable
  {
    String[] xAxisLabels= { "1998", "1999", "2000", "2001", "2002", "2003", "2004" };
    DataSeries dataSeries = new DataSeries( xAxisLabels, "Years", "Production", "The Micro$ofties have been so very, very, very, busy adding Bugs, this title is going to wrap to the next line" );

    dataSeries.addIAxisPlotDataSet( AxisChartsGuide.createAxisChartDataSet( ChartType.AREA, new AreaChartProperties(), 200, 5000 ) );

    ChartProperties chartProperties= this.getChartProperties();

    AxisProperties axisProperties= new AxisProperties();
    axisProperties.setXAxisLabelsAreVertical( true );
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()};
      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= { "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  } };
    String[] legendLabels= { "Bugs" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 1 );

    Stroke[] strokes= { LineChartProperties.DEFAULT_LINE_STROKE };
    Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE };
    LineChartProperties lineChartProperties= new LineChartProperties( strokes, shapes );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.LINE, lineChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    ChartProperties chartProperties= new ChartProperties();
    AxisProperties axisProperties= new AxisProperties();
    LegendProperties legendProperties= new LegendProperties();
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

  {
    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 );

    Stroke[] strokes= new Stroke[ 2 ];
    strokes[ 0 ]= new BasicStroke( 3.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 5f, new float[]{ 5f, 5f, 10f, 5f}, 4f );
    strokes[ 1 ]= new BasicStroke( 5.0f );
    Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE, null };
    LineChartProperties lineChartProperties= new LineChartProperties( strokes, shapes );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.LINE, lineChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

  {
    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  } };
    data[ 0 ][ 3 ]= Double.NaN;
    data[ 0 ][ 4 ]= Double.NaN;

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

    Stroke[] strokes= { LineChartProperties.DEFAULT_LINE_STROKE };
    Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE };
    LineChartProperties lineChartProperties= new LineChartProperties( strokes, shapes );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.LINE, lineChartProperties );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

  {
    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 );

    AreaChartProperties areaChartProperties= new AreaChartProperties();
    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.AREA, areaChartProperties );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

  {
    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( 3, 7, 0, 5000 );
    String[] legendLabels= { "Bugs", "Security Holes", "Backdoors" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 3 );

    AreaChartProperties areaChartProperties= new AreaChartProperties();
    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.AREA, areaChartProperties );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

TOP

Related Classes of org.krysalis.jcharts.chartData.DataSeries

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.