Package org.krysalis.jcharts.axisChart.customRenderers.axisValue

Examples of org.krysalis.jcharts.axisChart.customRenderers.axisValue.AxisValueRenderEvent


    totalItemArea.x= axisChart.getXAxis().getOrigin() + 1;
    totalItemArea.width= axisChart.getXAxis().getPixelLength() - 1;


      //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent= new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getXAxis().getZeroLineCoordinate() );


    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ )
      {
        g2d.setPaint( iAxisChartDataSet.getPaint( j ) );

        //---there is only ever one data set for a regular bar chart
        axisValueRenderEvent.setDataSetIndex( j );

        //---set values for the preRender event
        axisValueRenderEvent.setValueX( axisChart.getXAxis().getZeroLineCoordinate() );
        axisValueRenderEvent.setValueY( (float) rectangle.getCenterY() );
        axisValueRenderEvent.setValueIndex( i );

        //---we want to do this regardless if we render an item
        clusteredBarChartProperties.firePreRender( axisValueRenderEvent );


        //---if value == 0 do not plot anything.
        if( iAxisChartDataSet.getValue( j, i ) != 0.0d )
        {

          if( iAxisChartDataSet.getValue( j, i ) < 0 )
          {
            rectangle.x = axisChart.getXAxis().computeAxisCoordinate( axisChart.getXAxis().getOrigin(),
                                                   iAxisChartDataSet.getValue( j, i ),
                                                   axisChart.getXAxis().getScaleCalculator().getMinValue() );
            rectangle.width = startingX - rectangle.x;

            //---set values for the postRender event
            axisValueRenderEvent.setValueX( rectangle.x );
          }
          else
          {
            rectangle.x = startingX;
            rectangle.width = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ),
                                                axisChart.getXAxis().getOneUnitPixelSize() );

            //---set values for the postRender event
            axisValueRenderEvent.setValueX( rectangle.x + rectangle.width );
          }



          //---with a user defined scale, we could have non-zero data points with a height of zero.
View Full Code Here


    totalItemArea.width= axisChart.getXAxis().getScalePixelWidth() - 1;
    totalItemArea.height= axisChart.getYAxis().getPixelLength() - 1;


    //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent= new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getYAxis().getZeroLineCoordinate() );

    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ )
      {
        g2d.setPaint( iAxisChartDataSet.getPaint( j ) );


        //---there is only ever one data set for a regular bar chart
        axisValueRenderEvent.setDataSetIndex( j );


        //---if value == 0 do not plot anything.
        if( iAxisChartDataSet.getValue( j, i ) != 0.0d )
        {
          //---set values for the preRender event
          axisValueRenderEvent.setValueX( (float) rectangle.getCenterX() );
          axisValueRenderEvent.setValueY( axisChart.getYAxis().getZeroLineCoordinate() );
          axisValueRenderEvent.setValueIndex( i );

          //---we want to do this regardless if we render an item
          barChartProperties.firePreRender( axisValueRenderEvent );


          if( iAxisChartDataSet.getValue( j, i ) < 0 )
          {
            rectangle.y = startingY;
            rectangle.height = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ), axisChart.getYAxis().getOneUnitPixelSize() );

            //---set values for the postRender event
            axisValueRenderEvent.setValueY( rectangle.y + rectangle.height );
          }
          else
          {
            rectangle.y = axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(),
                                                   iAxisChartDataSet.getValue( j, i ),
                                                   axisChart.getYAxis().getScaleCalculator().getMinValue() );
            rectangle.height = startingY - rectangle.y;

            //---set values for the postRender event
            axisValueRenderEvent.setValueY( rectangle.y );
          }

          //---with a user defined scale, we could have non-zero data points with a height of zero.
          if( rectangle.height != 0 )
          {
View Full Code Here

    totalItemArea.height = axisChart.getYAxis().getScalePixelWidth() - 1;
    totalItemArea.x = axisChart.getXAxis().getOrigin() + 1;
    totalItemArea.width = axisChart.getXAxis().getPixelLength() - 1;

    //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent = new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getXAxis().getZeroLineCoordinate() );

    //---there is only ever one data set for a regular bar chart
    axisValueRenderEvent.setDataSetIndex( 0 );

    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      //---reset the paint as it might have changed for the outline drawing
      g2d.setPaint( iAxisChartDataSet.getPaint( 0 ) );

      //---set values for the preRender event
      axisValueRenderEvent.setValueX( axisChart.getXAxis().getZeroLineCoordinate() );
      axisValueRenderEvent.setValueY( (float) rectangle.getCenterY() );
      axisValueRenderEvent.setValueIndex( i );

      //---we want to do this regardless if we render an item
      barChartProperties.firePreRender( axisValueRenderEvent );

      //---if value == 0 do not plot anything.
      if( iAxisChartDataSet.getValue( 0, i ) != 0.0d )
      {
        if( iAxisChartDataSet.getValue( 0, i ) < 0 )
        {
          rectangle.x = axisChart.getXAxis().computeAxisCoordinate( axisChart.getXAxis().getOrigin(),
                                                  iAxisChartDataSet.getValue( 0, i ),
                                                  axisChart.getXAxis().getScaleCalculator().getMinValue() );
          rectangle.width = startingX - rectangle.x;

          //---set values for the postRender event
          axisValueRenderEvent.setValueX( rectangle.x );
        }
        else
        {
          rectangle.x = startingX;
          rectangle.width = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( 0, i ),
                                              axisChart.getXAxis().getOneUnitPixelSize() );

          //---set values for the postRender event
          axisValueRenderEvent.setValueX( rectangle.x + rectangle.width );
        }

        //---with a user defined scale, we could have non-zero data points with a height of zero.
        if( rectangle.width != 0 )
        {
View Full Code Here

    totalItemArea.y = axisChart.getYAxis().getOrigin() - axisChart.getYAxis().getPixelLength() + 1;
    totalItemArea.width = axisChart.getXAxis().getScalePixelWidth() - 1;
    totalItemArea.height = axisChart.getYAxis().getPixelLength() - 1;

    //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent = new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getYAxis().getZeroLineCoordinate() );

    //---there is only ever one data set for a regular bar chart
    axisValueRenderEvent.setDataSetIndex( 0 );

    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      //---reset the paint as it might have changed for the outline drawing
      g2d.setPaint( iAxisChartDataSet.getPaint( 0 ) );

      //---set values for the preRender event
      axisValueRenderEvent.setValueX( (float) rectangle.getCenterX() );
      axisValueRenderEvent.setValueY( axisChart.getYAxis().getZeroLineCoordinate() );
      axisValueRenderEvent.setValueIndex( i );

      //---we want to do this regardless if we render an item
      barChartProperties.firePreRender( axisValueRenderEvent );

      //---if value == 0 do not plot anything.
      if( iAxisChartDataSet.getValue( 0, i ) != 0.0d )
      {
        if( iAxisChartDataSet.getValue( 0, i ) < 0 )
        {
          rectangle.y = startingY;
          rectangle.height = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( 0, i ), axisChart.getYAxis().getOneUnitPixelSize() );

          axisValueRenderEvent.setValueY( rectangle.y + rectangle.height );
        }
        else
        {
          rectangle.y = axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(),
                                                 iAxisChartDataSet.getValue( 0, i ),
                                                 axisChart.getYAxis().getScaleCalculator().getMinValue() );
          rectangle.height = startingY - rectangle.y;

          axisValueRenderEvent.setValueY( rectangle.y );
        }

       
        //---with a user defined scale, we could have non-zero data points with a height of zero.
        if( rectangle.height != 0 )
View Full Code Here

    totalItemArea.x= axisChart.getXAxis().getOrigin() + 1;
    totalItemArea.width= axisChart.getXAxis().getPixelLength() - 1;


      //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent= new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getXAxis().getZeroLineCoordinate() );


    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ )
      {
        g2d.setPaint( iAxisChartDataSet.getPaint( j ) );

        //---there is only ever one data set for a regular bar chart
        axisValueRenderEvent.setDataSetIndex( j );

        //---set values for the preRender event
        axisValueRenderEvent.setValueX( axisChart.getXAxis().getZeroLineCoordinate() );
        axisValueRenderEvent.setValueY( (float) rectangle.getCenterY() );
        axisValueRenderEvent.setValueIndex( i );

        //---we want to do this regardless if we render an item
        clusteredBarChartProperties.firePreRender( axisValueRenderEvent );


        //---if value == 0 do not plot anything.
        if( iAxisChartDataSet.getValue( j, i ) != 0.0d )
        {

          if( iAxisChartDataSet.getValue( j, i ) < 0 )
          {
            rectangle.x = axisChart.getXAxis().computeAxisCoordinate( axisChart.getXAxis().getOrigin(),
                                                   iAxisChartDataSet.getValue( j, i ),
                                                   axisChart.getXAxis().getScaleCalculator().getMinValue() );
            rectangle.width = startingX - rectangle.x;

            //---set values for the postRender event
            axisValueRenderEvent.setValueX( rectangle.x );
          }
          else
          {
            rectangle.x = startingX;
            rectangle.width = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ),
                                                axisChart.getXAxis().getOneUnitPixelSize() );

            //---set values for the postRender event
            axisValueRenderEvent.setValueX( rectangle.x + rectangle.width );
          }



          //---with a user defined scale, we could have non-zero data points with a height of zero.
View Full Code Here

    totalItemArea.width= axisChart.getXAxis().getScalePixelWidth() - 1;
    totalItemArea.height= axisChart.getYAxis().getPixelLength() - 1;


    //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent= new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getYAxis().getZeroLineCoordinate() );

    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      for( int j = 0; j < iAxisChartDataSet.getNumberOfDataSets(); j++ )
      {
        g2d.setPaint( iAxisChartDataSet.getPaint( j ) );


        //---there is only ever one data set for a regular bar chart
        axisValueRenderEvent.setDataSetIndex( j );


        //---if value == 0 do not plot anything.
        if( iAxisChartDataSet.getValue( j, i ) != 0.0d )
        {
          //---set values for the preRender event
          axisValueRenderEvent.setValueX( (float) rectangle.getCenterX() );
          axisValueRenderEvent.setValueY( axisChart.getYAxis().getZeroLineCoordinate() );
          axisValueRenderEvent.setValueIndex( i );

          //---we want to do this regardless if we render an item
          barChartProperties.firePreRender( axisValueRenderEvent );


          if( iAxisChartDataSet.getValue( j, i ) < 0 )
          {
            rectangle.y = startingY;
            rectangle.height = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( j, i ), axisChart.getYAxis().getOneUnitPixelSize() );

            //---set values for the postRender event
            axisValueRenderEvent.setValueY( rectangle.y + rectangle.height );
          }
          else
          {
            rectangle.y = axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(),
                                                   iAxisChartDataSet.getValue( j, i ),
                                                   axisChart.getYAxis().getScaleCalculator().getMinValue() );
            rectangle.height = startingY - rectangle.y;

            //---set values for the postRender event
            axisValueRenderEvent.setValueY( rectangle.y );
          }

          //---with a user defined scale, we could have non-zero data points with a height of zero.
          if( rectangle.height != 0 )
          {
View Full Code Here

    totalItemArea.height = axisChart.getYAxis().getScalePixelWidth() - 1;
    totalItemArea.x = axisChart.getXAxis().getOrigin() + 1;
    totalItemArea.width = axisChart.getXAxis().getPixelLength() - 1;

    //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent = new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getXAxis().getZeroLineCoordinate() );

    //---there is only ever one data set for a regular bar chart
    axisValueRenderEvent.setDataSetIndex( 0 );

    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      //---reset the paint as it might have changed for the outline drawing
      g2d.setPaint( iAxisChartDataSet.getPaint( 0 ) );

      //---set values for the preRender event
      axisValueRenderEvent.setValueX( axisChart.getXAxis().getZeroLineCoordinate() );
      axisValueRenderEvent.setValueY( (float) rectangle.getCenterY() );
      axisValueRenderEvent.setValueIndex( i );

      //---we want to do this regardless if we render an item
      barChartProperties.firePreRender( axisValueRenderEvent );

      //---if value == 0 do not plot anything.
      if( iAxisChartDataSet.getValue( 0, i ) != 0.0d )
      {
        if( iAxisChartDataSet.getValue( 0, i ) < 0 )
        {
          rectangle.x = axisChart.getXAxis().computeAxisCoordinate( axisChart.getXAxis().getOrigin(),
                                                  iAxisChartDataSet.getValue( 0, i ),
                                                  axisChart.getXAxis().getScaleCalculator().getMinValue() );
          rectangle.width = startingX - rectangle.x;

          //---set values for the postRender event
          axisValueRenderEvent.setValueX( rectangle.x );
        }
        else
        {
          rectangle.x = startingX;
          rectangle.width = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( 0, i ),
                                              axisChart.getXAxis().getOneUnitPixelSize() );

          //---set values for the postRender event
          axisValueRenderEvent.setValueX( rectangle.x + rectangle.width );
        }

        //---with a user defined scale, we could have non-zero data points with a height of zero.
        if( rectangle.width != 0 )
        {
View Full Code Here

    totalItemArea.y = axisChart.getYAxis().getOrigin() - axisChart.getYAxis().getPixelLength() + 1;
    totalItemArea.width = axisChart.getXAxis().getScalePixelWidth() - 1;
    totalItemArea.height = axisChart.getYAxis().getPixelLength() - 1;

    //---reuse the same Object for pre and post render events.
    AxisValueRenderEvent axisValueRenderEvent = new AxisValueRenderEvent( axisChart,
                                                  iAxisChartDataSet,
                                                  g2d,
                                                  totalItemArea,
                                                  axisChart.getYAxis().getZeroLineCoordinate() );

    //---there is only ever one data set for a regular bar chart
    axisValueRenderEvent.setDataSetIndex( 0 );

    //LOOP
    for( int i = 0; i < iAxisChartDataSet.getNumberOfDataItems(); i++ )
    {
      //---reset the paint as it might have changed for the outline drawing
      g2d.setPaint( iAxisChartDataSet.getPaint( 0 ) );

      //---set values for the preRender event
      axisValueRenderEvent.setValueX( (float) rectangle.getCenterX() );
      axisValueRenderEvent.setValueY( axisChart.getYAxis().getZeroLineCoordinate() );
      axisValueRenderEvent.setValueIndex( i );

      //---we want to do this regardless if we render an item
      barChartProperties.firePreRender( axisValueRenderEvent );

      //---if value == 0 do not plot anything.
      if( iAxisChartDataSet.getValue( 0, i ) != 0.0d )
      {
        if( iAxisChartDataSet.getValue( 0, i ) < 0 )
        {
          rectangle.y = startingY;
          rectangle.height = BarChart.computeScaleHeightOfValue( iAxisChartDataSet.getValue( 0, i ), axisChart.getYAxis().getOneUnitPixelSize() );

          axisValueRenderEvent.setValueY( rectangle.y + rectangle.height );
        }
        else
        {
          rectangle.y = axisChart.getYAxis().computeAxisCoordinate( axisChart.getYAxis().getOrigin(),
                                                 iAxisChartDataSet.getValue( 0, i ),
                                                 axisChart.getYAxis().getScaleCalculator().getMinValue() );
          rectangle.height = startingY - rectangle.y;

          axisValueRenderEvent.setValueY( rectangle.y );
        }

       
        //---with a user defined scale, we could have non-zero data points with a height of zero.
        if( rectangle.height != 0 )
View Full Code Here

TOP

Related Classes of org.krysalis.jcharts.axisChart.customRenderers.axisValue.AxisValueRenderEvent

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.