Examples of DataAxisProperties


Examples of org.jCharts.properties.DataAxisProperties

                        _data, _legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties );
            dataSeries.addIAxisPlotDataSet( axisChartDataSet );

            ChartProperties chartProperties= new ChartProperties();
            LabelAxisProperties xaxis = new LabelAxisProperties();
            DataAxisProperties yaxis = new DataAxisProperties();
            yaxis.setUseCommas(showGrouping);

            if (legendFont != null) {
                yaxis.setAxisTitleChartFont(new ChartFont(legendFont, new Color(20)));
                yaxis.setScaleChartFont(new ChartFont(legendFont, new Color(20)));
                xaxis.setAxisTitleChartFont(new ChartFont(legendFont, new Color(20)));
                xaxis.setScaleChartFont(new ChartFont(legendFont, new Color(20)));
            }
            if (titleFont != null) {
                chartProperties.setTitleFont(new ChartFont(titleFont, new Color(0)));
            }

            // Y Axis
            try {
                BigDecimal round = new BigDecimal(max / 1000d);
                round = round.setScale(0, BigDecimal.ROUND_UP);
                double topValue = round.doubleValue() * 1000;
                yaxis.setUserDefinedScale(0, 500);
                yaxis.setNumItems((int) (topValue / 500)+1);
                yaxis.setShowGridLines(1);
            } catch (PropertyException e) {
                log.warn("",e);
            }

            AxisProperties axisProperties= new AxisProperties(xaxis, yaxis);
View Full Code Here

Examples of org.jCharts.properties.DataAxisProperties

                        _data, _legendLabels, paints, ChartType.BAR_CLUSTERED, clusteredBarChartProperties );
            dataSeries.addIAxisPlotDataSet( axisChartDataSet );

            ChartProperties chartProperties= new ChartProperties();
            LabelAxisProperties xaxis = new LabelAxisProperties();
            DataAxisProperties yaxis = new DataAxisProperties();
            yaxis.setUseCommas(showGrouping);

            if (legendFont != null) {
                yaxis.setAxisTitleChartFont(new ChartFont(legendFont, new Color(20)));
                yaxis.setScaleChartFont(new ChartFont(legendFont, new Color(20)));
                xaxis.setAxisTitleChartFont(new ChartFont(legendFont, new Color(20)));
                xaxis.setScaleChartFont(new ChartFont(legendFont, new Color(20)));
            }
            if (titleFont != null) {
                chartProperties.setTitleFont(new ChartFont(titleFont, new Color(0)));
            }

            // Y Axis
            try {
                BigDecimal round = new BigDecimal(max / 1000d);
                round = round.setScale(0, BigDecimal.ROUND_UP);
                double topValue = round.doubleValue() * 1000;
                yaxis.setUserDefinedScale(0, 500);
                yaxis.setNumItems((int) (topValue / 500)+1);
                yaxis.setShowGridLines(1);
            } catch (PropertyException e) {
                log.warn("",e);
            }

            AxisProperties axisProperties= new AxisProperties(xaxis, yaxis);
View Full Code Here

Examples of org.jCharts.properties.DataAxisProperties

            AxisProperties axisProperties = new AxisProperties();
            // show the grid lines, to turn it off, set it to zero
            axisProperties.getYAxisProperties().setShowGridLines(1);
            axisProperties.setXAxisLabelsAreVertical(true);
            // set the Y Axis to round
            DataAxisProperties daxp = (DataAxisProperties)axisProperties.getYAxisProperties();
            daxp.setRoundToNearest(1);
            LegendProperties legendProperties = new LegendProperties();
            AxisChart axisChart = new AxisChart(
                    dataSeries, chartProperties, axisProperties,
                    legendProperties, _width, _height );
            axisChart.setGraphics2D((Graphics2D) g);
View Full Code Here

Examples of org.jCharts.properties.DataAxisProperties

            AxisProperties axisProperties = new AxisProperties();
            // show the grid lines, to turn it off, set it to zero
            axisProperties.getYAxisProperties().setShowGridLines(1);
            axisProperties.setXAxisLabelsAreVertical(true);
            // set the Y Axis to round
            DataAxisProperties daxp = (DataAxisProperties)axisProperties.getYAxisProperties();
            daxp.setRoundToNearest(1);
            LegendProperties legendProperties = new LegendProperties();
            AxisChart axisChart = new AxisChart(
                    dataSeries, chartProperties, axisProperties,
                    legendProperties, _width, _height );
            axisChart.setGraphics2D((Graphics2D) g);
View Full Code Here

Examples of org.jCharts.properties.DataAxisProperties

                        _data, legendLabels, paints, ChartType.BAR, barChartProperties );
            dataSeries.addIAxisPlotDataSet( axisChartDataSet );

            ChartProperties chartProperties= new ChartProperties();
            LabelAxisProperties xaxis = new LabelAxisProperties();
            DataAxisProperties yaxis = new DataAxisProperties();

            try {
                BigDecimal round = new BigDecimal(max / 1000d);
                round = round.setScale(0, BigDecimal.ROUND_UP);
                double topValue = round.doubleValue() * 1000;
                yaxis.setUserDefinedScale(0, 500);
                yaxis.setNumItems((int) (topValue / 500)+1);
                yaxis.setShowGridLines(1);
            } catch (PropertyException e) {
                log.warn("",e);
            }
           
            AxisProperties axisProperties= new AxisProperties(xaxis, yaxis);
View Full Code Here

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

Examples of org.krysalis.jcharts.properties.DataAxisProperties

                                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

Examples of org.krysalis.jcharts.properties.DataAxisProperties

      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

Examples of org.krysalis.jcharts.properties.DataAxisProperties

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

Examples of org.krysalis.jcharts.properties.DataAxisProperties

    float startingY;
    float width;
    float height;


    DataAxisProperties dataAxisProperties;


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