Examples of AxisChart


Examples of org.krysalis.jcharts.axisChart.AxisChart

    ChartProperties chartProperties= new ChartProperties();
    AxisProperties axisProperties= new AxisProperties();
    LegendProperties legendProperties= new LegendProperties();

    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );

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

Examples of org.krysalis.jcharts.axisChart.AxisChart

      double[][] data = new double[][]{{1500, 6880, 4510, 2600, 1200, 1580, 8000, 4555, 4000, 6120}};
      String[] legendLabels = {"Bugs"};
      Paint[] paints = new Paint[]{Color.blue.darker()};
      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 );

      //---this call will render the chart to an internal BufferedImage, creating all the image map coordinates
      axisChart.renderWithImageMap();

      //---get the ImageMap information from the chart
      ImageMap imageMap = axisChart.getImageMap();

      //---set the ImageMap into the HttpServletRequest so can get it out in JSP
      httpServletRequest.setAttribute( ChartServlet.IMAGE_MAP, imageMap );

      //---set the Chart into the HttpSession so we can stream it in another request
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart

    dataSeries.addIAxisPlotDataSet( AxisChartsGuide.createAxisChartDataSet( ChartType.LINE, lineChartProperties, 3, legendLabels, 200, 5000 ) );

    ChartProperties chartProperties= new ChartProperties();
    AxisProperties axisProperties= new AxisProperties();

    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );

    return axisChart;
  }
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart

    AxisProperties axisProperties= new AxisProperties();

    LegendProperties legendProperties= new LegendProperties();
    legendProperties.setIconBorderPaint( Color.red );

    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );

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

Examples of org.krysalis.jcharts.axisChart.AxisChart

    xAxis.setUserDefinedScale( -300, 200 );
*/

    LegendProperties legendProperties = new LegendProperties();

    AxisChart axisChart = new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, 500, 400 );

    axisChart.renderWithImageMap();

    ChartTestDriver.exportImage( axisChart, "pointChartTest.png" );
  }
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart

  static void axisChartTest( String name, AxisChartTestBase axisChartTestBase ) throws ChartDataException, PropertyException
  {
    LegendProperties legendProperties;
    ChartProperties chartProperties;
    AxisProperties axisProperties;
    AxisChart axisChart;

    int numTestsToRun = 10;
    String fileName;

    HTMLGenerator htmlGenerator = new HTMLGenerator( ChartTestDriver.OUTPUT_PATH + name + "Test.html" );

    for( int i = 0; i < numTestsToRun; i++ )
    {
      DataSeries dataSeries= axisChartTestBase.getDataSeries();

      boolean horizontalPlot= true; //( TestDataGenerator.getRandomNumber( 1 ) > 0.5d );
      boolean createImageMap= true; //( TestDataGenerator.getRandomNumber( 1 ) > 0.5d );

      axisProperties = new AxisProperties( horizontalPlot );
      axisProperties.setXAxisLabelsAreVertical( ( TestDataGenerator.getRandomNumber( 1 ) > 0.5d ) );

      TestDataGenerator.randomizeAxisProperties( axisProperties );
      //axisProperties.setYAxisNumItems( 6 );

      DataAxisProperties dataAxisProperties;
      LabelAxisProperties labelAxisProperties;

      if( horizontalPlot )
      {
        dataAxisProperties = ( DataAxisProperties ) axisProperties.getXAxisProperties();
        labelAxisProperties = ( LabelAxisProperties ) axisProperties.getYAxisProperties();
      }
      else
      {
        dataAxisProperties = ( DataAxisProperties ) axisProperties.getYAxisProperties();
        labelAxisProperties = ( LabelAxisProperties ) axisProperties.getXAxisProperties();
      }

      dataAxisProperties.setRoundToNearest( 1 );
      //dataAxisProperties.setUserDefinedScale( 10, 500 );
     

      //---if the labels are NULL, force to zero.
      if( dataSeries.getNumberOfAxisLabels() == 0 )
      {
        labelAxisProperties.setShowAxisLabels( false );
      }
      else
      {
        labelAxisProperties.setShowAxisLabels( ( TestDataGenerator.getRandomNumber( 1 ) > 0.3d ) );
      }


      int width = ( int ) TestDataGenerator.getRandomNumber( 500, 1000 );
      int height = ( int ) TestDataGenerator.getRandomNumber( 300, 800 );

      legendProperties = new LegendProperties();
      TestDataGenerator.randomizeLegend( legendProperties );
      //legendProperties.setPlacement( LegendAreaProperties.RIGHT );

      chartProperties = new ChartProperties();
      //chartProperties.setBorderStroke( new BasicStroke( 1f ) );


      axisChart = new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, width, height );


      fileName = ChartTestDriver.OUTPUT_PATH + name + i + ChartTestDriver.EXTENSION;


      ImageMap imageMap;
      if( createImageMap && axisChartTestBase.supportsImageMap() )
      {
        axisChart.renderWithImageMap();
        imageMap= axisChart.getImageMap();
      }
      else
      {
        imageMap= null;
      }

      try
      {
        ChartTestDriver.exportImage( axisChart, fileName );
      }
      catch( NullPointerException nullPointerException )
      {
        nullPointerException.printStackTrace();
        System.out.println();
      }

      axisChart.toHTML( htmlGenerator, fileName, imageMap );
      htmlGenerator.addLineBreak();
    }

    htmlGenerator.saveFile();
  }
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart

    ChartProperties chartProperties= new ChartProperties();
    AxisProperties axisProperties= new AxisProperties();
    LegendProperties legendProperties= new LegendProperties();

    AxisChart axisChart= new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );

    super.exportImage( axisChart, "stackedArea" );

  }
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart



    LegendProperties legendProperties = new LegendProperties();

    AxisChart axisChart = new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, 500, 400 );

    ChartTestDriver.exportImage( axisChart, "BarChartTest.png" );


  }
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart

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

    ChartProperties chartProperties = new ChartProperties();
    LegendProperties legendProperties = new LegendProperties();

    AxisChart axisChart = new AxisChart( dataSeries, chartProperties, axisProperties, legendProperties, AxisChartsGuide.width, AxisChartsGuide.height );

    return axisChart;
  }
View Full Code Here

Examples of org.krysalis.jcharts.axisChart.AxisChart

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