Package org.krysalis.jcharts.properties.util

Examples of org.krysalis.jcharts.properties.util.ChartStroke


  /*****************************************************************************************/
  private void gridLines() throws ChartDataException
  {
    AxisProperties axisProperties = new AxisProperties();

    ChartStroke xAxisGridLines = new ChartStroke( new BasicStroke( 1.0f ), Color.red );
    axisProperties.getXAxisProperties().setGridLineChartStroke( xAxisGridLines );
    axisProperties.getXAxisProperties().setShowGridLines( AxisTypeProperties.GRID_LINES_ONLY_WITH_LABELS );

    axisProperties.getYAxisProperties().setShowGridLines( AxisTypeProperties.GRID_LINES_NONE );

View Full Code Here


    super.exportImage( this.getChart( axisProperties ), "noZeroLine" );

    dataAxisProperties.setShowZeroLine( true );

    BasicStroke stroke = new BasicStroke( 1f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 5f, new float[]{5f, 5f, 10f, 5f}, 4f );
    ChartStroke zeroLineChartStroke = new ChartStroke( stroke, Color.red );
    dataAxisProperties.setZeroLineChartStroke( zeroLineChartStroke );
    super.exportImage( this.getChart( axisProperties ), "zeroLinePaintStroke" );
  }
View Full Code Here

    axisProperties.getXAxisProperties().setShowTicks( AxisTypeProperties.TICKS_NONE );
    super.exportImage( this.getChart( axisProperties ), "noTicks" );


    axisProperties = new AxisProperties();
    ChartStroke xTicks = new ChartStroke( new BasicStroke( 1.0f ), Color.blue );
    axisProperties.getXAxisProperties().setTickChartStroke( xTicks );

    ChartStroke yTicks = new ChartStroke( new BasicStroke( 1.0f ), Color.green );
    axisProperties.getYAxisProperties().setTickChartStroke( yTicks );

    super.exportImage( this.getChart( axisProperties ), "tickColors" );


    axisProperties = new AxisProperties();
    ChartStroke xTickStroke = new ChartStroke( new BasicStroke( 2.0f ), Color.blue );
    axisProperties.getXAxisProperties().setTickChartStroke( xTickStroke );
    super.exportImage( this.getChart( axisProperties ), "tickStroke" );
  }
View Full Code Here

   ******************************************************************************************/
  private static PieChartDataSet getPieChartDataSet( int numToCreate, int minValue, int maxValue ) throws ChartDataException
  {
    PieChart2DProperties properties = new PieChart2DProperties();
    //properties.setZeroDegreeOffset( (float) TestDataGenerator.getRandomNumber( 0, 500 ) );
    properties.setBorderChartStroke( new ChartStroke( new BasicStroke( 1.0f ), TestDataGenerator.getRandomPaint() ) );

    String[] labels = TestDataGenerator.getRandomStrings( numToCreate, (int) TestDataGenerator.getRandomNumber( 3, 20 ), false );
    Paint[] paints = TestDataGenerator.getRandomPaints( numToCreate );

    return new PieChartDataSet( "This is a test title", TestDataGenerator.getRandomNumbers( numToCreate, minValue, maxValue ), labels, paints, properties );
View Full Code Here

   ******************************************************************************************/
  private static PieChartDataSet getPieChartDataSet( int numToCreate, int minValue, int maxValue ) throws ChartDataException
  {
    PieChart2DProperties properties = new PieChart2DProperties();
    //properties.setZeroDegreeOffset( (float) TestDataGenerator.getRandomNumber( 0, 500 ) );
    properties.setBorderChartStroke( new ChartStroke( new BasicStroke( 1.0f ), TestDataGenerator.getRandomPaint() ) );

    String[] labels = TestDataGenerator.getRandomStrings( numToCreate, (int) TestDataGenerator.getRandomNumber( 3, 20 ), false );
    Paint[] paints = TestDataGenerator.getRandomPaints( numToCreate );

    return new PieChartDataSet( "This is a test title", TestDataGenerator.getRandomNumbers( numToCreate, minValue, maxValue ), labels, paints, properties );
View Full Code Here

   ******************************************************************************************/
  private static PieChartDataSet getPieChartDataSet( int numToCreate, int minValue, int maxValue ) throws ChartDataException
  {
    PieChart2DProperties properties = new PieChart2DProperties();
    //properties.setZeroDegreeOffset( (float) TestDataGenerator.getRandomNumber( 0, 500 ) );
    properties.setBorderChartStroke( new ChartStroke( new BasicStroke( 1.0f ), TestDataGenerator.getRandomPaint() ) );

    String[] labels = TestDataGenerator.getRandomStrings( numToCreate, (int) TestDataGenerator.getRandomNumber( 3, 20 ), false );
    Paint[] paints = TestDataGenerator.getRandomPaints( numToCreate );

    return new PieChartDataSet( "This is a test title", TestDataGenerator.getRandomNumbers( numToCreate, minValue, maxValue ), labels, paints, properties );
View Full Code Here

//    axisProperties.setScaleFont( TestDataGenerator.getRandomFont( 12.0, 15.0 ) );
    //axisProperties.setScaleFontColor( TestDataGenerator.getRandomPaint() );

    //axisProperties.setAxisTitleFont( TestDataGenerator.getRandomFont( 6.0, 20.0 ) );

    axisProperties.getXAxisProperties().setAxisStroke( new ChartStroke( new BasicStroke( 1.5f ), TestDataGenerator.getRandomPaint() ) );
    axisProperties.getYAxisProperties().setAxisStroke( new ChartStroke( new BasicStroke( 1.5f ), TestDataGenerator.getRandomPaint() ) );


    //axisProperties.setBackgroundPaint( TestDataGenerator.getRandomPaint() );
  }
View Full Code Here

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

    axisProperties.getYAxisProperties().setShowGridLines( AxisTypeProperties.GRID_LINES_NONE );
    axisProperties.getYAxisProperties().setAxisStroke( new ChartStroke( new BasicStroke( 1.5f ), Color.red ) );


    DataAxisProperties yAxis = (DataAxisProperties) axisProperties.getYAxisProperties();
    yAxis.setRoundToNearest( 1 );
    //xAxis.setUserDefinedScale( -300, 200 );
View Full Code Here

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

    axisProperties.getYAxisProperties().setShowGridLines( AxisTypeProperties.GRID_LINES_ALL );
    axisProperties.getYAxisProperties().setAxisStroke( new ChartStroke( new BasicStroke( 1.5f ), Color.red ) );
      axisProperties.getYAxisProperties().setGridLineChartStroke( new ChartStroke( new BasicStroke( 1.5f ), Color.red ) );

    //axisProperties.setXAxisLabelsAreVertical( true );


    DataAxisProperties yAxis = (DataAxisProperties) axisProperties.getYAxisProperties();
View Full Code Here

TOP

Related Classes of org.krysalis.jcharts.properties.util.ChartStroke

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.