addSampleData();
    public Chart getModel(String sSubType, Orientation orientation, String sDimension)    {        if (newChart == null)        {            newChart = ChartWithAxesImpl.create();            newChart.setType(sType);            newChart.setSubType(sSubType);            newChart.setOrientation(orientation);            newChart.setDimension(getDimensionFor(sDimension));        }        else        {            return newChart;        }        ((Axis) newChart.getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL);        ((Axis) newChart.getAxes().get(0)).setType(AxisType.TEXT_LITERAL);        ((Axis) newChart.getAxes().get(0)).getTitle().getCaption().setValue("Base Axis Title");        SeriesDefinition sdX = SeriesDefinitionImpl.create();        Series categorySeries = SeriesImpl.create();        sdX.getSeries().add(categorySeries);        ((Axis) newChart.getAxes().get(0)).getSeriesDefinitions().add(sdX);        newChart.getTitle().getLabel().getCaption().setValue("Line Chart Title");        if (sSubType.equalsIgnoreCase("Stacked"))        {            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0))                .setOrientation(Orientation.VERTICAL_LITERAL);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getTitle().getCaption().setValue(                "Orthogonal Axis Title");            SeriesDefinition sdY = SeriesDefinitionImpl.create();            sdY.getQuery().setDefinition("MyExpression(Table.Column)");            sdY.getSeriesPalette().update(0);            Series valueSeries = LineSeriesImpl.create();            valueSeries.getLabel().setVisible(true);            ((LineSeries) valueSeries).setStacked(true);            sdY.getSeries().add(valueSeries);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().add(sdY);        }        else if (sSubType.equalsIgnoreCase("Percent Stacked"))        {            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0))                .setOrientation(Orientation.VERTICAL_LITERAL);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setPercent(true);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getTitle().getCaption().setValue(                "Orthogonal Axis Title");            SeriesDefinition sdY = SeriesDefinitionImpl.create();            sdY.getQuery().setDefinition("MyExpression(Table.Column)");            sdY.getSeriesPalette().update(0);            Series valueSeries = LineSeriesImpl.create();            valueSeries.getLabel().setVisible(true);            ((LineSeries) valueSeries).setStacked(true);            sdY.getSeries().add(valueSeries);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().add(sdY);        }        else if (sSubType.equalsIgnoreCase("Overlay"))        {            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0))                .setOrientation(Orientation.VERTICAL_LITERAL);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getTitle().getCaption().setValue(                "Orthogonal Axis Title");            SeriesDefinition sdY = SeriesDefinitionImpl.create();            sdY.getQuery().setDefinition("MyExpression(Table.Column)");            sdY.getSeriesPalette().update(0);            Series valueSeries = LineSeriesImpl.create();            valueSeries.getLabel().setVisible(true);            ((LineSeries) valueSeries).setStacked(false);            sdY.getSeries().add(valueSeries);            ((Axis) ((Axis) newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().add(sdY);        }        return newChart;    }