Examples of StackedBarChartProperties


Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

   *
   *
   ******************************************************************************************/
  DataSeries getDataSeries() throws ChartDataException
  {
    StackedBarChartProperties stackedBarChartProperties;
    DataSeries dataSeries;
    AxisChartDataSet axisChartDataSet;

    int dataSize=(int) TestDataGenerator.getRandomNumber( 1, 30 );
    int numberOfDataSets=(int) TestDataGenerator.getRandomNumber( 1, 5 );


    dataSeries=super.createDataSeries( dataSize );


    stackedBarChartProperties=new StackedBarChartProperties();


    axisChartDataSet=super.createAxisChartDataSet( ChartType.BAR_STACKED,
                                    stackedBarChartProperties,
                                    numberOfDataSets,
View Full Code Here

Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

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

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

/*
 
View Full Code Here

Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

   * @param axisChart
   *********************************************************************************************/
  static void render( AxisChart axisChart, IAxisChartDataSet iAxisChartDataSet ) throws ChartDataException
  {
    Graphics2D g2d = axisChart.getGraphics2D();
    StackedBarChartProperties stackedBarChartProperties = (StackedBarChartProperties) iAxisChartDataSet.getChartTypeProperties();


    float barWidth;

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


    DataAxisProperties dataAxisProperties;


    if( axisChart.getAxisProperties().isPlotHorizontal() )
    {
      dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getXAxisProperties();
      barWidth = axisChart.getYAxis().getScalePixelWidth() * stackedBarChartProperties.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 );

      StackedBarChart.horizontalPlot( axisChart, iAxisChartDataSet, stackedBarChartProperties, dataAxisProperties, g2d, rectangle, startingX );
    }
    else
    {
      dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties();
      barWidth = axisChart.getXAxis().getScalePixelWidth() * stackedBarChartProperties.getPercentage();

      startingX = axisChart.getXAxis().getTickStart() - (barWidth / 2);
      startingY = axisChart.getYAxis().getZeroLineCoordinate();
      width = barWidth;
      height = 0;
View Full Code Here

Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

    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  }, { 250, 45, 36, 66, 145, 80, 55  } };
    String[] legendLabels= { "Bugs", "Security Holes", "Backdoors" };
    Paint[] paints= TestDataGenerator.getRandomPaints( 3 );
    StackedBarChartProperties stackedBarChartProperties= new StackedBarChartProperties();
    AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR_STACKED, stackedBarChartProperties );
    dataSeries.addIAxisPlotDataSet( axisChartDataSet );

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

Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

   * @param axisChart
   *********************************************************************************************/
  static void render( AxisChart axisChart, IAxisChartDataSet iAxisChartDataSet ) throws ChartDataException
  {
    Graphics2D g2d = axisChart.getGraphics2D();
    StackedBarChartProperties stackedBarChartProperties = (StackedBarChartProperties) iAxisChartDataSet.getChartTypeProperties();


    float barWidth;

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


    DataAxisProperties dataAxisProperties;


    if( axisChart.getAxisProperties().isPlotHorizontal() )
    {
      dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getXAxisProperties();
      barWidth = axisChart.getYAxis().getScalePixelWidth() * stackedBarChartProperties.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 );

      StackedBarChart.horizontalPlot( axisChart, iAxisChartDataSet, stackedBarChartProperties, dataAxisProperties, g2d, rectangle, startingX );
    }
    else
    {
      dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties();
      barWidth = axisChart.getXAxis().getScalePixelWidth() * stackedBarChartProperties.getPercentage();

      startingX = axisChart.getXAxis().getTickStart() - (barWidth / 2);
      startingY = axisChart.getYAxis().getZeroLineCoordinate();
      width = barWidth;
      height = 0;
View Full Code Here

Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

   *
   *
   ******************************************************************************************/
  DataSeries getDataSeries() throws ChartDataException
  {
    StackedBarChartProperties stackedBarChartProperties;
    DataSeries dataSeries;
    AxisChartDataSet axisChartDataSet;

    int dataSize=(int) TestDataGenerator.getRandomNumber( 1, 30 );
    int numberOfDataSets=(int) TestDataGenerator.getRandomNumber( 1, 5 );


    dataSeries=super.createDataSeries( dataSize );


    stackedBarChartProperties=new StackedBarChartProperties();


    axisChartDataSet=super.createAxisChartDataSet( ChartType.BAR_STACKED,
                                    stackedBarChartProperties,
                                    numberOfDataSets,
View Full Code Here

Examples of org.krysalis.jcharts.properties.StackedBarChartProperties

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

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

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