Package ofc4j.model.elements

Examples of ofc4j.model.elements.LineChart


public class AreaChartFactory extends LineChartFactory {

  @Override
  public LineChart getLineChartFromColumn( int col ) {
    LineChart ac = null;
    if ( linechartstyle != LineChart.Style.HOLLOW ) {
      AreaLineChart ahc = new AreaLineChart();
      ahc.setFill( getColor( col ) );
      ac = ahc;
    } else {
      AreaHollowChart ahc = new AreaHollowChart();
      ahc.setFill( getColor( col ) );
      ac = ahc;
    }

    Number[] numbers = new Number[getRowCount()];
    for ( int row = 0; row < getRowCount(); row++ ) {
      numbers[row] = ( (Number) getValueAt( row, col ) ).doubleValue();
    }

    ac.addValues( numbers );
    ac.setColour( getColor( col ) );

    if ( linechartwidth != null ) {
      ac.setWidth( linechartwidth );
    }
    if ( tooltipText != null ) {
      ac.setTooltip( tooltipText );
    }

    // set the title for this series
    ac.setText( getColumnHeader( col ) );

    // set the onclick event to the base url template
    if ( null != baseURLTemplate ) {
      ac.setOn_click( baseURLTemplate );
    }
    if ( alpha != null ) {
      ac.setAlpha( alpha );
    }

    return ac;
  }
View Full Code Here


      if ( getValue( (Node) node ) != null ) {
        bars.add( getValue( (Node) node ) );
      }
    }
    if ( !bars.contains( text ) ) {
      LineChart lc = lineChartFactory.getLineChartFromColumn( col );
      lc.setRightYAxis();
      return lc;
    } else {
      return getVerticalBarChartFromColumn( col );
    }
View Full Code Here

      }
    }
  }

  public LineChart getLineChartFromColumn( int col ) {
    LineChart lc = new LineChart( this.linechartstyle );
    for ( int row = 0; row < getRowCount(); row++ ) {
      double d = ( (Number) getValueAt( row, col ) ).doubleValue();
      LineChart.Dot dot = new LineChart.Dot( d );

      if ( dotwidth != null ) {
        dot.setDotSize( dotwidth );
      }
      lc.addDots( dot );
    }
    if ( linechartwidth != null ) {
      lc.setWidth( linechartwidth );
    }

    lc.setColour( getColor( col ) );

    if ( tooltipText != null ) {
      lc.setTooltip( tooltipText );
    }

    // set the title for this series
    lc.setText( getColumnHeader( col ) );

    // set the onclick event to the base url template
    if ( null != baseURLTemplate ) {
      lc.setOn_click( baseURLTemplate );
    }

    if ( alpha != null ) {
      lc.setAlpha( alpha );
    }

    return lc;
  }
View Full Code Here

TOP

Related Classes of ofc4j.model.elements.LineChart

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.