Examples of BarChartProperties


Examples of org.krysalis.jcharts.properties.BarChartProperties

    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

Examples of org.krysalis.jcharts.properties.BarChartProperties


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

Examples of org.krysalis.jcharts.properties.BarChartProperties

  }

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

Examples of org.krysalis.jcharts.properties.BarChartProperties

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

Examples of org.krysalis.jcharts.properties.BarChartProperties

    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

Examples of org.krysalis.jcharts.properties.BarChartProperties

   * 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

Examples of org.krysalis.jcharts.properties.BarChartProperties

   * @throws PropertyException
   * @throws ChartDataException
   *****************************************************************************************/
  public static void main( String[] args ) throws PropertyException, ChartDataException
  {
    BarChartProperties barChartProperties = new BarChartProperties();

    //BackgroundRenderer backgroundRenderer = new BackgroundRenderer( new Color( 20, 20, 20, 50 ) );
    //barChartProperties.addPreRenderEventListener( backgroundRenderer );

/*
 
View Full Code Here

Examples of org.krysalis.jcharts.properties.BarChartProperties

    String xAxisTitle = "Months";
    String yAxisTitle = "Bugs";
    String title = "Micro$oft At Work";

    DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title );
    AxisChartDataSet axisChartDataSet = new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR, new BarChartProperties() );

    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

    AxisChart axisChart = new AxisChart( dataSeries, new ChartProperties(), axisProperties, new LegendProperties(), width, height );
    super.exportImage( axisChart, "horizontalPlots" );
View Full Code Here

Examples of org.krysalis.jcharts.properties.BarChartProperties

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

Examples of org.krysalis.jcharts.properties.BarChartProperties

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