Package org.krysalis.jcharts.chartText

Examples of org.krysalis.jcharts.chartText.NumericTagGroup


    //---if we want to display value labels on the chart need to determine the width this will take
    if( !properties.getPieLabelType().equals( PieLabelType.NO_LABELS ) )
    {
      if( properties.getPieLabelType().equals( PieLabelType.VALUE_LABELS ) )
      {
        this.textTagGroup = new NumericTagGroup( properties.getValueLabelFont(),
                                    fontRenderContext,
                                    properties.showValueLabelCurrency(),
                                    false,
                                    properties.showValueLabelGrouping(),
                                    properties.getValueLabelRoundingPowerOfTen() );
View Full Code Here


//    if( dataAxisProperties.showAxisLabels() )
    {
//TODO what if they do not want to display axis labels?
//todo we still need to know how to size the axis
      NumericTagGroup numericTagGroup = new NumericTagGroup( dataAxisProperties.getScaleChartFont(),
                                           fontRenderContext,
                                           dataAxisProperties.useDollarSigns(),
                                           dataAxisProperties.usePercentSigns(),
                                           dataAxisProperties.useCommas(),
                                           dataAxisProperties.getRoundToNearest() );

      numericTagGroup.createAxisScaleLabels( axis.getScaleCalculator() );
      return numericTagGroup;
    }
/*
    else
    {
 
View Full Code Here

    {
      //---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();
                                // Rounding problems were causing errors
                                //Integer myInteger = new Integer ( Math.round(Math.round((float)(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight()))/10)*10 );
                                //String myString = new String ("");
                                //myString = myInteger.toString();
                                String myString = new String (String.valueOf(Math.round(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight())) );
                                numericTagGroup2.addLabel(myString);
                                j++;
                            }
                            this.yAxis.setAxisLabelsGroupRight(numericTagGroup2);
                        }
    }
View Full Code Here

    axis.getScaleCalculator().setNumberOfScaleItems( dataAxisProperties.getNumItems() );
    axis.getScaleCalculator().computeScaleValues();


//TODO what if they do not want to display axis labels?
    NumericTagGroup numericTagGroup = new NumericTagGroup( dataAxisProperties.getScaleChartFont(),
                                         fontRenderContext,
                                         dataAxisProperties.useDollarSigns(),
                                         dataAxisProperties.usePercentSigns(),
                                         dataAxisProperties.useCommas(),
                                         dataAxisProperties.getRoundToNearest() );

    numericTagGroup.createAxisScaleLabels( axis.getScaleCalculator() );

    return numericTagGroup;
  }
View Full Code Here

  protected void setupAxis( AxisChartDataProcessor axisChartDataProcessor, FontRenderContext fontRenderContext )
  {
    //---X AXIS---------------------------------------------------------------------------
    DataAxisProperties dataAxisProperties = (DataAxisProperties) this.getAxisProperties().getXAxisProperties();
    this.xAxis = new XAxis( this, dataAxisProperties.getNumItems() );
    NumericTagGroup numericTagGroup = this.setupDataAxisProperties( this.xAxis, dataAxisProperties, axisChartDataProcessor, fontRenderContext );
    this.xAxis.setAxisLabelsGroup( numericTagGroup );

    //---Y AXIS---------------------------------------------------------------------------
    dataAxisProperties = (DataAxisProperties) this.getAxisProperties().getYAxisProperties();
    this.yAxis = new YAxis( this, dataAxisProperties.getNumItems() );
View Full Code Here

    axis.getScaleCalculator().setNumberOfScaleItems( dataAxisProperties.getNumItems() );
    axis.getScaleCalculator().computeScaleValues();


//TODO what if they do not want to display axis labels?
    NumericTagGroup numericTagGroup = new NumericTagGroup( dataAxisProperties.getScaleChartFont(),
                                         fontRenderContext,
                                         dataAxisProperties.useDollarSigns(),
                                         dataAxisProperties.usePercentSigns(),
                                         dataAxisProperties.useCommas(),
                                         dataAxisProperties.getRoundToNearest() );

    numericTagGroup.createAxisScaleLabels( axis.getScaleCalculator() );

    return numericTagGroup;
  }
View Full Code Here

  protected void setupAxis( AxisChartDataProcessor axisChartDataProcessor, FontRenderContext fontRenderContext )
  {
    //---X AXIS---------------------------------------------------------------------------
    DataAxisProperties dataAxisProperties = (DataAxisProperties) this.getAxisProperties().getXAxisProperties();
    this.xAxis = new XAxis( this, dataAxisProperties.getNumItems() );
    NumericTagGroup numericTagGroup = this.setupDataAxisProperties( this.xAxis, dataAxisProperties, axisChartDataProcessor, fontRenderContext );
    this.xAxis.setAxisLabelsGroup( numericTagGroup );

    //---Y AXIS---------------------------------------------------------------------------
    dataAxisProperties = (DataAxisProperties) this.getAxisProperties().getYAxisProperties();
    this.yAxis = new YAxis( this, dataAxisProperties.getNumItems() );
View Full Code Here

//    if( dataAxisProperties.showAxisLabels() )
    {
//TODO what if they do not want to display axis labels?
//todo we still need to know how to size the axis
      NumericTagGroup numericTagGroup = new NumericTagGroup( dataAxisProperties.getScaleChartFont(),
                                           fontRenderContext,
                                           dataAxisProperties.useDollarSigns(),
                                           dataAxisProperties.usePercentSigns(),
                                           dataAxisProperties.useCommas(),
                                           dataAxisProperties.getRoundToNearest() );

      numericTagGroup.createAxisScaleLabels( axis.getScaleCalculator() );
      return numericTagGroup;
    }
/*
    else
    {
 
View Full Code Here

    {
      //---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();
                                // Rounding problems were causing errors
                                //Integer myInteger = new Integer ( Math.round(Math.round((float)(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight()))/10)*10 );
                                //String myString = new String ("");
                                //myString = myInteger.toString();
                                String myString = new String (String.valueOf(Math.round(temp / this.axisProperties.getYAxisProperties().getSecondScaleRight())) );
                                numericTagGroup2.addLabel(myString);
                                j++;
                            }
                            this.yAxis.setAxisLabelsGroupRight(numericTagGroup2);
                        }
    }
View Full Code Here

    //---if we want to display value labels on the chart need to determine the width this will take
    if( !properties.getPieLabelType().equals( PieLabelType.NO_LABELS ) )
    {
      if( properties.getPieLabelType().equals( PieLabelType.VALUE_LABELS ) )
      {
        this.textTagGroup = new NumericTagGroup( properties.getValueLabelFont(),
                                    fontRenderContext,
                                    properties.showValueLabelCurrency(),
                                    false,
                                    properties.showValueLabelGrouping(),
                                    properties.getValueLabelRoundingPowerOfTen() );
View Full Code Here

TOP

Related Classes of org.krysalis.jcharts.chartText.NumericTagGroup

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.