chart.setSampleData(getConvertedSampleData(chart.getSampleData()));
chart.setSampleData(getConvertedSampleData(chart.getSampleData(), iSeriesDefinitionIndex));
    public void translateFrom(Series series, Chart chart)    {        System.out.println("StockSeriesImpl: DEBUG: translating from " + series.getClass().getName()            + " to line series.");        this.getLineAttributes().setVisible(true);        this.getLineAttributes().setColor(ColorDefinitionImpl.BLACK());        this.setStacked(false);        // Copy generic series properties        this.setLabel(series.getLabel());        if (series.getLabelPosition().equals(Position.INSIDE_LITERAL)            || series.getLabelPosition().equals(Position.OUTSIDE_LITERAL))        {            this.setLabelPosition(series.getLabelPosition());        }        else        {            this.setLabelPosition(Position.OUTSIDE_LITERAL);        }        this.setVisible(series.isVisible());        if (series.eIsSet(ComponentPackage.eINSTANCE.getSeries_Triggers()))        {            this.getTriggers().addAll(series.getTriggers());        }        if (series.eIsSet(ComponentPackage.eINSTANCE.getSeries_DataPoint()))        {            this.setDataPoint(series.getDataPoint());        }        if (series.eIsSet(ComponentPackage.eINSTANCE.getSeries_DataDefinition()))        {            this.getDataDefinition().addAll(series.getDataDefinition());        }        // Copy series specific properties        if (series instanceof BarSeries)        {            this.getLineAttributes().setColor(((BarSeries) series).getRiserOutline());        }        else if (series instanceof LineSeries)        {            this.setLineAttributes(((LineSeries) series).getLineAttributes());        }        // Update the chart dimensions to 2D        chart.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);        // Update the base axis to type text if it isn't already        if (chart instanceof ChartWithAxes)        {            ((Axis) ((ChartWithAxes) chart).getAxes().get(0)).setType(AxisType.DATE_TIME_LITERAL);            ((Axis) ((ChartWithAxes) chart).getAxes().get(0)).setCategoryAxis(true);            EList axes = ((Axis) ((ChartWithAxes) chart).getAxes().get(0)).getAssociatedAxes();            for (int i = 0; i < axes.size(); i++)            {                ((Axis) axes.get(i)).setType(AxisType.LINEAR_LITERAL);                ((Axis) axes.get(i)).setPercent(false);            }        }        else        {            throw new IllegalArgumentException(                chart.getClass().getName()                    + " is an invalid argument for StockSeriesImpl. The chart model must be an instance of org.eclipse.birt.chart.model.ChartWithAxes.");        }        // Update the sampledata in the model        chart.setSampleData(getConvertedSampleData(chart.getSampleData()));    }