Package org.krysalis.jcharts.properties

Examples of org.krysalis.jcharts.properties.BarChartProperties


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

    this.barChartProperties = new BarChartProperties();
  }
View Full Code Here


    dataAxisProperties.setRoundToNearest( 2 );

    ChartFont titleFont = new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black );
    this.chartProperties.setTitleFont( titleFont );

    this.barChartProperties = new BarChartProperties();

    ValueLabelRenderer valueLabelRenderer = new ValueLabelRenderer( false, false, true, -1 );
    valueLabelRenderer.setValueLabelPosition( ValueLabelPosition.ON_TOP );
    valueLabelRenderer.useVerticalLabels( false );
    barChartProperties.addPostRenderEventListener( valueLabelRenderer );
View Full Code Here

    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

      double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  } };
    String[] legendLabels= { "Bugs" };
    Paint[] paints= new Paint[]{ Color.blue.darker() };
    BarChartProperties barChartProperties= new BarChartProperties();
    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, barChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

      double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  } };
    String[] legendLabels= { "Bugs" };
    Paint[] paints= new Paint[]{ Color.yellow };
    BarChartProperties barChartProperties= new BarChartProperties();

    ValueLabelRenderer valueLabelRenderer = new ValueLabelRenderer( false, false, true, -1 );
    valueLabelRenderer.setValueLabelPosition( ValueLabelPosition.AT_TOP );
    valueLabelRenderer.useVerticalLabels( false );
    barChartProperties.addPostRenderEventListener( valueLabelRenderer );


    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, barChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );
View Full Code Here

    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );

      double[][] data= new double[][]{ { 250, 45, -36, 66, 145, 80, 55  } };
    String[] legendLabels= { "Bugs" };
    Paint[] paints= new Paint[]{ Color.blue.darker() };
    BarChartProperties barChartProperties= new BarChartProperties();

    //---paints over the background of every other bar area.
    BackgroundRenderer backgroundRenderer = new BackgroundRenderer( new Color( 20, 20, 20, 50 ) );
    barChartProperties.addPreRenderEventListener( backgroundRenderer );

    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, barChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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


  /******************************************************************************************/
  private void barWidths() throws ChartDataException
  {
    BarChartProperties barChartProperties= new BarChartProperties();
    barChartProperties.setWidthPercentage( 1f );

    AxisChart axisChart= this.getBarChart( barChartProperties );

    super.exportImage( axisChart, "barChartWidths" );
  }
View Full Code Here

  }

  /******************************************************************************************/
  private void barOutlines() throws ChartDataException
  {
    BarChartProperties barChartProperties= new BarChartProperties();
    barChartProperties.setShowOutlinesFlag( true );
    ChartStroke outlineChartStroke= new ChartStroke( new BasicStroke( 2.0f ), Color.red );
    barChartProperties.setBarOutlineStroke( outlineChartStroke );

    AxisChart axisChart= this.getBarChart( barChartProperties );

    super.exportImage( axisChart, "barChartOutlines" );
  }
View Full Code Here

   * @param iAxisChartDataSet
   **************************************************************************************/
  static void render( AxisChart axisChart, IAxisChartDataSet iAxisChartDataSet )
  {
    Graphics2D g2d = axisChart.getGraphics2D();
    BarChartProperties barChartProperties = (BarChartProperties) iAxisChartDataSet.getChartTypeProperties();
    float barWidth;

    //---y axis position on screen to start drawing.
    float startingX;
    float startingY;
    float width;
    float height;

    if( axisChart.getAxisProperties().isPlotHorizontal() )
    {
      barWidth = axisChart.getYAxis().getScalePixelWidth() * barChartProperties.getPercentage();
      startingX = axisChart.getXAxis().getZeroLineCoordinate();
      startingY = axisChart.getYAxis().getLastTickY() - (barWidth / 2);
      width = 0;
      height = barWidth;
      Rectangle2D.Float rectangle = new Rectangle2D.Float( startingX, startingY, width, height );

      BarChart.horizontalPlotaxisChart,
                        iAxisChartDataSet,
                        barChartProperties,
                        g2d,
                        rectangle,
                        startingX );
    }
    else
    {
      barWidth = axisChart.getXAxis().getScalePixelWidth() * barChartProperties.getPercentage();
      startingX = axisChart.getXAxis().getTickStart() - (barWidth / 2);
      startingY = axisChart.getYAxis().getZeroLineCoordinate();
      width = barWidth;
      height = 0;
      Rectangle2D.Float rectangle = new Rectangle2D.Float( startingX, startingY, width, height );
View Full Code Here

    axisProperties.getYAxisProperties().setTitleChartFont( axisTitleFont );

    ChartFont titleFont = new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Color.black );
    this.chartProperties.setTitleFont( titleFont );

    this.barChartProperties = new BarChartProperties();
  }
View Full Code Here

   * Separate this so can use for combo chart test
   *
   ******************************************************************************************/
  static ChartTypeProperties getChartTypeProperties( int numberOfDataSets )
  {
    BarChartProperties barChartProperties = new BarChartProperties();
    barChartProperties.setWidthPercentage( 1f );

    return barChartProperties;
  }
View Full Code Here

TOP

Related Classes of org.krysalis.jcharts.properties.BarChartProperties

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.