Examples of DataSeries


Examples of org.jCharts.chartData.DataSeries

            for (int i = 0; i < _xAxisLabels.length; i++) {
                String label = _xAxisLabels[i];
                _xAxisLabels[i]=squeeze(label, _maxLength);
            }
            this.setPreferredSize(new Dimension(_width,_height));
            DataSeries dataSeries = new DataSeries( _xAxisLabels, null, _yAxisTitle, _title ); // replace _xAxisTitle to null (don't display x axis title)

            ClusteredBarChartProperties clusteredBarChartProperties= new ClusteredBarChartProperties();
            clusteredBarChartProperties.setShowOutlinesFlag(outlinesBarFlag);
            ValueLabelRenderer valueLabelRenderer = new ValueLabelRenderer(false, false, showGrouping, 0);
            valueLabelRenderer.setValueLabelPosition(ValueLabelPosition.AT_TOP);

            valueLabelRenderer.setValueChartFont(new ChartFont(valueFont, foreColor));
            valueLabelRenderer.useVerticalLabels(valueOrientation);

            clusteredBarChartProperties.addPostRenderEventListener(valueLabelRenderer);

            Paint[] paints = new Paint[_color.length];
            System.arraycopy(_color, 0, paints, 0, paints.length);
           
            AxisChartDataSet axisChartDataSet =
                new AxisChartDataSet(
                        _data, _legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties );
            dataSeries.addIAxisPlotDataSet( axisChartDataSet );

            ChartProperties chartProperties= new ChartProperties();
            LabelAxisProperties xaxis = new LabelAxisProperties();
            DataAxisProperties yaxis = new DataAxisProperties();
            yaxis.setUseCommas(showGrouping);
View Full Code Here

Examples of org.jCharts.chartData.DataSeries

            for (int i = 0; i < _xAxisLabels.length; i++) {
                String label = _xAxisLabels[i];
                _xAxisLabels[i]=squeeze(label, _maxLength);
            }
            this.setPreferredSize(new Dimension(_width,_height));
            DataSeries dataSeries = new DataSeries( _xAxisLabels, _xAxisTitle, _yAxisTitle, _title );

            String[] legendLabels= { yAxisLabel };
            Paint[] paints= new Paint[] { Color.yellow };
            BarChartProperties barChartProperties= new BarChartProperties();
            ValueLabelRenderer valueLabelRenderer = new ValueLabelRenderer(false, false, true, 0);
            valueLabelRenderer.setValueLabelPosition(ValueLabelPosition.AT_TOP);
            valueLabelRenderer.useVerticalLabels(true);
            barChartProperties.addPostRenderEventListener(valueLabelRenderer);
            AxisChartDataSet axisChartDataSet =
                new AxisChartDataSet(
                        _data, legendLabels, paints, ChartType.BAR, barChartProperties );
            dataSeries.addIAxisPlotDataSet( axisChartDataSet );

            ChartProperties chartProperties= new ChartProperties();
            LabelAxisProperties xaxis = new LabelAxisProperties();
            DataAxisProperties yaxis = new DataAxisProperties();
View Full Code Here

Examples of org.jCharts.chartData.DataSeries

            }
            if (_height == 0) {
                _height = 250;
            }
            this.setPreferredSize(new Dimension(_width,_height));
            DataSeries dataSeries = new DataSeries( _xAxisLabels, _xAxisTitle, _yAxisTitle, _title );
            String[] legendLabels= yAxisLabel;
            Paint[] paints = this.createPaint(_data.length);
            Shape[] shapes = createShapes(_data.length);
            Stroke[] lstrokes = createStrokes(_data.length);
            LineChartProperties lineChartProperties= new LineChartProperties(lstrokes,shapes);
            AxisChartDataSet axisChartDataSet= new AxisChartDataSet( _data,
                    legendLabels,
                    paints,
                    ChartType.LINE,
                    lineChartProperties );
            dataSeries.addIAxisPlotDataSet( axisChartDataSet );

            ChartProperties chartProperties = new ChartProperties();
            AxisProperties axisProperties = new AxisProperties();
            // show the grid lines, to turn it off, set it to zero
            axisProperties.getYAxisProperties().setShowGridLines(1);
View Full Code Here

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

Examples of org.krysalis.jcharts.chartData.DataSeries

  /********************************************************************************************/
  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

Examples of org.krysalis.jcharts.chartData.DataSeries

  /********************************************************************************************/
  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

Examples of org.krysalis.jcharts.chartData.DataSeries

    {
      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

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  } };
    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

Examples of org.krysalis.jcharts.chartData.DataSeries

    {
      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

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

    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
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.