/*
   * (non-Javadoc)
   *
   * @see com.ibm.examples.chart.widget.AbstractChartBuilder#buildChart()
   */
  protected void createChart() {
    data = adapter.getData();
    while (data.length == 0) {
      data = adapter.getData();
    }
    IPreferenceStore store = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
    xSeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_X_SERIES_TICKS);
    ySeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS);
    maxItems = store.getInt(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS);
    viewableItems = store.getInt(GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS);

    chart = ChartWithAxesImpl.create();

    chart.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
    chart.setType("Scatter Chart");

    // Plot
    // chart.getBlock( ).setBackground(ColorDefinitionImpl.WHITE( ) );
    //  Plot p = chart.getPlot( );
    ///  p.getClientArea( ).setBackground(GradientImpl.create( ColorDefinitionImpl.create(
    // 225,225,255 ),ColorDefinitionImpl.create( 255, 255, 225 ),-35,false ) );
    // p.getOutline( ).setVisible( true );
    // Title        cwaBar.getTitle( )                .getLabel()                .getCaption( )
    //           .setValue( "Bar Chart with        Multiple Y Series" );//$NON-NLS-1$
    // Legend
    // Legend lg = cwaBar.getLegend( );
    // lg.getText(
    // ).getFont( ).setSize( 16 );        lg.getInsets( ).set( 10, 5, 0, 0 );
    // lg.setAnchor( Anchor.NORTH_LITERAL );

  }
 public void setScale(double scale) {
   IPreferenceStore store = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
   xSeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_X_SERIES_TICKS);
   xSeriesTicks = (int) (((Integer) xSeriesTicks).doubleValue() * scale);
   handleUpdateEvent();
 }