Package org.krysalis.jcharts.properties

Examples of org.krysalis.jcharts.properties.DataAxisProperties


    ChartFont axisTitleFont = new ChartFont( new Font( "Arial Narrow", Font.PLAIN, 14 ), Color.black );
    axisProperties.getXAxisProperties().setTitleChartFont( axisTitleFont );
    axisProperties.getYAxisProperties().setTitleChartFont( axisTitleFont );

    DataAxisProperties dataAxisProperties = (DataAxisProperties) axisProperties.getYAxisProperties();

    try
    {
      dataAxisProperties.setUserDefinedScale( -3000, 3000 );
    }
    catch( PropertyException propertyException )
    {
      propertyException.printStackTrace();
    }

    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();
View Full Code Here


                                axisChart.getChartProperties().getTitleFont(),
                                fontRenderContext );
    }
    */

    DataAxisProperties dataAxisProperties;
    if( axisChart.getAxisProperties().isPlotHorizontal() )
    {
      dataAxisProperties= (DataAxisProperties) axisChart.getAxisProperties().getXAxisProperties();
    }
    else
    {
      dataAxisProperties= (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties();
    }


    //---if there is a user defined scale, there is no reason to process the data.
    if( ! dataAxisProperties.hasUserDefinedScale() )
    {
      this.processDataSet( (IDataSeries) axisChart.getIAxisDataSeries() );
    }


View Full Code Here

      IDataSeries iDataSeries= (IDataSeries) this.getIAxisDataSeries();

    if( this.axisProperties.isPlotHorizontal() )
    {
      //---X AXIS---------------------------------------------------------------------------
      DataAxisProperties dataAxisProperties = (DataAxisProperties) this.getAxisProperties().getXAxisProperties();
      this.xAxis = new XAxis( this, dataAxisProperties.getNumItems() );

      NumericTagGroup numericTagGroup= setupDataAxisProperties( this.xAxis, dataAxisProperties, axisChartDataProcessor, fontRenderContext );
      this.xAxis.setAxisLabelsGroup( numericTagGroup );


      //---Y AXIS---------------------------------------------------------------------------
      AxisTypeProperties axisTypeProperties = this.getAxisProperties().getYAxisProperties();
      this.yAxis = new YAxis( this, axisChartDataProcessor.getNumberOfElementsInADataSet() );
      if( axisTypeProperties.showAxisLabels() )
      {
        TextTagGroup textTagGroup = new TextTagGroup( axisTypeProperties.getScaleChartFont(), fontRenderContext );

        //LOOP
        for( int i = 0; i < iDataSeries.getNumberOfAxisLabels(); i++ )
        {
          if( iDataSeries.getAxisLabel( i ) == null )
          {
            throw new ChartDataException( "None of the axis labels can be NULL." );
          }
          textTagGroup.addLabel( iDataSeries.getAxisLabel( i ) );
        }

        this.yAxis.setAxisLabelsGroup( textTagGroup );
      }
    }
    else
    {
      //---X AXIS---------------------------------------------------------------------------
      AxisTypeProperties axisTypeProperties = this.getAxisProperties().getXAxisProperties();
      this.xAxis = new XAxis( this, axisChartDataProcessor.getNumberOfElementsInADataSet() );
      if( axisTypeProperties.showAxisLabels() )
      {
        TextTagGroup textTagGroup = new TextTagGroup( axisTypeProperties.getScaleChartFont(), fontRenderContext );

        //LOOP
        for( int i = 0; i < iDataSeries.getNumberOfAxisLabels(); i++ )
        {
          if( iDataSeries.getAxisLabel( i ) == null )
          {
            throw new ChartDataException( "None of the axis labels can be NULL." );
          }
          textTagGroup.addLabel( iDataSeries.getAxisLabel( i ) );
        }

        this.xAxis.setAxisLabelsGroup( textTagGroup );
      }

      //---Y AXIS---------------------------------------------------------------------------
      DataAxisProperties dataAxisProperties = ( DataAxisProperties ) this.getAxisProperties().getYAxisProperties();
      this.yAxis = new YAxis( this, dataAxisProperties.getNumItems() );
      NumericTagGroup numericTagGroup= setupDataAxisProperties( this.yAxis, dataAxisProperties, axisChartDataProcessor, fontRenderContext );
      this.yAxis.setAxisLabelsGroup( numericTagGroup );
                        // Dual Y axis changes integrated CMC 25Aug03
                        // compute the labels of the right axis if necessary
                        if ( this.axisProperties.getYAxisProperties().getSecondScaleRight()!=1 )
                        {
                            NumericTagGroup numericTagGroup2 = new NumericTagGroup( dataAxisProperties.getScaleChartFontRight(),
                                                                                                                                                                                         fontRenderContext,
                                                                                                                                                                                         dataAxisProperties.useDollarSigns(),
                                                                                                                                                                                         dataAxisProperties.usePercentSigns(),
                                                                                                                                                                                         dataAxisProperties.useCommas(),
                                                                                                                                                                                         dataAxisProperties.getRoundToNearest() );
                            int j=0;
                            while (j<this.getYAxis().getNumberOfScaleItems())
                            {
                                Float myFloat = new Float (this.yAxis.getAxisLabelsGroup().getTextTag(j).getText());
                                float temp = myFloat.floatValue();
View Full Code Here

    //---cache the computed values
    //float[][] yAxisCoordinates= new float[ iAxisChartDataSet.getNumberOfDataSets() ][ iAxisChartDataSet.getNumberOfDataItems() ];

    //---StackedAreaCharts can not be drawn on a horizontal axis so y-axis will always be the data axis
    DataAxisProperties dataAxisProperties= (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties();


    float stackedValue=0f;

View Full Code Here

    float startingY;
    float width;
    float height;


    DataAxisProperties dataAxisProperties;


    if( axisChart.getAxisProperties().isPlotHorizontal() )
    {
      dataAxisProperties = (DataAxisProperties) axisChart.getAxisProperties().getXAxisProperties();
View Full Code Here

    legendProperties.setChartFont(legendFont);
    legendProperties.setChartPadding(10);

    //Arrondi � la puissance 10
    //Round up to the power of 10
    DataAxisProperties dataAxisProperties= (DataAxisProperties) axisProperties.getYAxisProperties();
    dataAxisProperties.setRoundToNearest(1);

    //Parametrage du nombre de graduation sur l'axe des ordonn�es
    //Set the number of ticks(?) for the ordinal axis
    dataAxisProperties.setNumItems(6);

    //utilisation de la virgule s'il y a lieu (normalement non)
    // Set the use of the comma if there are any (usually not)
    dataAxisProperties.setUseCommas(false);

    //Ne pas afficher les bordures sup�rieur et droite du chart
    // Don't attach upper borders and the right of the chart
    axisProperties.getYAxisProperties().setShowEndBorder(false);
    axisProperties.getXAxisProperties().setShowEndBorder(false);
View Full Code Here

  {
    Graphics2D g2d=axisChart.getGraphics2D();
    PointChartProperties pointChartProperties=(PointChartProperties) iAxisChartDataSet.getChartTypeProperties();

    //---Point Charts can not be horizontal so we know the y-axis is DataAxisProperties
    DataAxisProperties dataAxisProperties= (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties();
    IDataSeries iDataSeries= (IDataSeries) axisChart.getIAxisDataSeries();


    float xPosition=axisChart.getXAxis().getTickStart();
    float yPosition;
View Full Code Here

  static final void render( AxisChart axisChart, IStockChartDataSet iStockChartDataSet )
  {
    StockChartProperties stockChartProperties=(StockChartProperties) iStockChartDataSet.getChartTypeProperties();
    Graphics2D g2d=axisChart.getGraphics2D();

    DataAxisProperties dataAxisProperties= (DataAxisProperties) axisChart.getAxisProperties().getYAxisProperties();
      IDataSeries iDataSeries= (IDataSeries) axisChart.getIAxisDataSeries();


    //---cache the computed values
    //float[][] yAxisCoordinates=new float[ iStockChartDataSet.getNumberOfDataSets() ][ iStockChartDataSet.getNumberOfDataItems() ];
View Full Code Here

      ScatterPlotDataSeries scatterPlotDataSeries = new ScatterPlotDataSeries( scatterPlotDataSet,
                                                       "X-Axis Title",
                                                       "Y-Axis Title",
                                                       "Chart Title" );

      DataAxisProperties xAxisProperties = new DataAxisProperties();
      xAxisProperties.setUserDefinedScale( -5, 3 );
      xAxisProperties.setNumItems( 10 );
      xAxisProperties.setRoundToNearest( 0 );

      DataAxisProperties yAxisProperties = new DataAxisProperties();
      yAxisProperties.setUserDefinedScale( -30, 50 );
      yAxisProperties.setNumItems( 10 );
      yAxisProperties.setRoundToNearest( 1 );

      AxisProperties axisProperties = new AxisProperties( xAxisProperties, yAxisProperties );
      ChartProperties chartProperties = new ChartProperties();
      LegendProperties legendProperties = new LegendProperties();
View Full Code Here

      axisProperties.getYAxisProperties().setGridLineChartStroke( new ChartStroke( new BasicStroke( 1.5f ), Color.red ) );

    //axisProperties.setXAxisLabelsAreVertical( true );


    DataAxisProperties yAxis = (DataAxisProperties) axisProperties.getYAxisProperties();
//    yAxis.setUsePercentSigns( true );
//    yAxis.setUserDefinedScale( 0, 0.05 );
    yAxis.setNumItems( 10 );
    yAxis.setRoundToNearest( -3 );



    LegendProperties legendProperties = new LegendProperties();
View Full Code Here

TOP

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

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.