use of org.eclipse.swtchart.extensions.linecharts.ILineSeriesSettings in project swtchart by eclipse.
the class LineSeries_Selection_Part method applyChartSettings.
private void applyChartSettings() throws Exception {
/*
* Chart Settings
*/
IChartSettings chartSettings = lineChart.getChartSettings();
chartSettings.setCreateMenu(true);
/*
* Primary X-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsX = chartSettings.getPrimaryAxisSettingsX();
primaryAxisSettingsX.setTitle("Retention Time (milliseconds)");
primaryAxisSettingsX.setDecimalFormat(new DecimalFormat(("0.0##"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsX.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
/*
* Primary Y-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsY = chartSettings.getPrimaryAxisSettingsY();
primaryAxisSettingsY.setTitle("Intensity");
primaryAxisSettingsY.setDecimalFormat(new DecimalFormat(("0.0#E0"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsY.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
primaryAxisSettingsY.setGridLineStyle(LineStyle.NONE);
/*
* Secondary Y-Axes
*/
ISecondaryAxisSettings secondaryAxisSettingsY1 = new SecondaryAxisSettings("Relative Intensity [%]", new RelativeIntensityConverter(SWT.VERTICAL, true));
secondaryAxisSettingsY1.setPosition(Position.Secondary);
secondaryAxisSettingsY1.setDecimalFormat(new DecimalFormat(("0.00"), new DecimalFormatSymbols(Locale.ENGLISH)));
secondaryAxisSettingsY1.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
chartSettings.getSecondaryAxisSettingsListY().add(secondaryAxisSettingsY1);
//
lineChart.applySettings(chartSettings);
/*
* Create series.
*/
List<ILineSeriesData> lineSeriesDataList = new ArrayList<ILineSeriesData>();
ISeriesData seriesDataLine = SeriesConverter.getSeriesXY(SeriesConverter.LINE_SERIES_3);
double[] xSeries = seriesDataLine.getXSeries();
double[] ySeries = seriesDataLine.getYSeries();
xValues = new TreeSet<Double>();
yValues = new HashMap<Double, Double>();
for (int i = 0; i < xSeries.length; i++) {
double x = xSeries[i];
xValues.add(x);
yValues.put(x, ySeries[i]);
}
/*
* Line Series
*/
ILineSeriesData lineSeriesData;
ILineSeriesSettings lineSeriesSettings;
//
lineSeriesData = new LineSeriesData(seriesDataLine);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(true);
ILineSeriesSettings lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setLineWidth(2);
lineSeriesDataList.add(lineSeriesData);
/*
* Selected Point
*/
seriesDataPoint = new SeriesData(new double[] { 0.0 }, new double[] { 0.0 }, DATA_POINT_SERIES);
lineSeriesData = new LineSeriesData(seriesDataPoint);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setSymbolSize(5);
lineSeriesSettings.setSymbolType(PlotSymbolType.CROSS);
lineSeriesSettings.setEnableArea(true);
lineSeriesDataList.add(lineSeriesData);
/*
* Set series.
*/
lineChart.addSeriesData(lineSeriesDataList);
}
use of org.eclipse.swtchart.extensions.linecharts.ILineSeriesSettings in project swtchart by eclipse.
the class MeasurementSeries_1_Part method initialize.
private void initialize() throws Exception {
/*
* Chart Settings
*/
IChartSettings chartSettings = getChartSettings();
chartSettings.setOrientation(SWT.HORIZONTAL);
chartSettings.setHorizontalSliderVisible(true);
chartSettings.setVerticalSliderVisible(false);
chartSettings.getRangeRestriction().setZeroX(true);
chartSettings.getRangeRestriction().setZeroY(true);
chartSettings.setCreateMenu(true);
/*
* Primary X-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsX = chartSettings.getPrimaryAxisSettingsX();
primaryAxisSettingsX.setTitle("Concentration [mg/g]");
primaryAxisSettingsX.setDecimalFormat(new DecimalFormat(("0.00"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsX.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
primaryAxisSettingsX.setGridLineStyle(LineStyle.DOT);
/*
* Primary Y-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsY = chartSettings.getPrimaryAxisSettingsY();
primaryAxisSettingsY.setTitle("Area");
primaryAxisSettingsY.setDecimalFormat(new DecimalFormat(("0.00"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsY.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
primaryAxisSettingsY.setGridLineStyle(LineStyle.DOT);
//
applySettings(chartSettings);
/*
* Create series.
*/
List<ILineSeriesData> lineSeriesDataList = new ArrayList<ILineSeriesData>();
ISeriesData seriesData;
ILineSeriesData lineSeriesData;
ILineSeriesSettings lineSeriesSettings;
ILineSeriesSettings lineSeriesSettingsHighlight;
/*
* Readings
*/
seriesData = SeriesConverter.getSeriesXY(SeriesConverter.MEASUREMENT_SERIES_1_READINGS);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(false);
lineSeriesSettings.setLineStyle(LineStyle.NONE);
lineSeriesSettings.setSymbolSize(5);
lineSeriesSettings.setSymbolColor(getDisplay().getSystemColor(SWT.COLOR_RED));
lineSeriesSettings.setSymbolType(PlotSymbolType.CIRCLE);
lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setLineWidth(2);
lineSeriesDataList.add(lineSeriesData);
/*
* Regression
*/
seriesData = SeriesConverter.getSeriesXY(SeriesConverter.MEASUREMENT_SERIES_1_REGRESSION);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(false);
lineSeriesSettings.setLineStyle(LineStyle.SOLID);
lineSeriesSettings.setLineColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
lineSeriesSettings.setSymbolType(PlotSymbolType.NONE);
lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setLineWidth(2);
lineSeriesDataList.add(lineSeriesData);
/*
* Set series.
*/
addSeriesData(lineSeriesDataList);
}
use of org.eclipse.swtchart.extensions.linecharts.ILineSeriesSettings in project swtchart by eclipse.
the class MeasurementSeries_2_Part method initialize.
private void initialize() throws Exception {
/*
* Chart Settings
*/
IChartSettings chartSettings = getChartSettings();
chartSettings.setOrientation(SWT.HORIZONTAL);
chartSettings.setHorizontalSliderVisible(true);
chartSettings.setVerticalSliderVisible(false);
chartSettings.getRangeRestriction().setZeroX(true);
chartSettings.getRangeRestriction().setZeroY(true);
chartSettings.setCreateMenu(true);
/*
* Primary X-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsX = chartSettings.getPrimaryAxisSettingsX();
primaryAxisSettingsX.setTitle("Concentration [mg/g]");
primaryAxisSettingsX.setDecimalFormat(new DecimalFormat(("0.00"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsX.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
primaryAxisSettingsX.setGridLineStyle(LineStyle.DOT);
/*
* Primary Y-Axis
*/
IPrimaryAxisSettings primaryAxisSettingsY = chartSettings.getPrimaryAxisSettingsY();
primaryAxisSettingsY.setTitle("Area");
primaryAxisSettingsY.setDecimalFormat(new DecimalFormat(("0.00"), new DecimalFormatSymbols(Locale.ENGLISH)));
primaryAxisSettingsY.setColor(getDisplay().getSystemColor(SWT.COLOR_BLACK));
primaryAxisSettingsY.setGridLineStyle(LineStyle.DOT);
//
applySettings(chartSettings);
/*
* Create series.
*/
Map<Integer, Color> colors = new HashMap<Integer, Color>();
colors.put(1, getDisplay().getSystemColor(SWT.COLOR_BLACK));
colors.put(2, getDisplay().getSystemColor(SWT.COLOR_RED));
colors.put(3, getDisplay().getSystemColor(SWT.COLOR_GRAY));
//
List<ILineSeriesData> lineSeriesDataList = new ArrayList<ILineSeriesData>();
ISeriesData seriesData;
ILineSeriesData lineSeriesData;
ILineSeriesSettings lineSeriesSettings;
ILineSeriesSettings lineSeriesSettingsHighlight;
//
for (int i = 1; i <= 3; i++) {
/*
* Readings
*/
seriesData = SeriesConverter.getSeriesXY("Measurement2_Readings_" + i);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(false);
lineSeriesSettings.setLineStyle(LineStyle.NONE);
lineSeriesSettings.setSymbolSize(5);
lineSeriesSettings.setSymbolColor(colors.get(i));
lineSeriesSettings.setSymbolType(PlotSymbolType.CIRCLE);
lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setLineWidth(2);
lineSeriesDataList.add(lineSeriesData);
/*
* Regression
*/
seriesData = SeriesConverter.getSeriesXY("Measurement2_Regression_" + i);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(false);
lineSeriesSettings.setLineStyle(LineStyle.SOLID);
lineSeriesSettings.setLineColor(colors.get(i));
lineSeriesSettings.setSymbolType(PlotSymbolType.NONE);
lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setLineWidth(2);
lineSeriesDataList.add(lineSeriesData);
}
/*
* Set series.
*/
addSeriesData(lineSeriesDataList);
}
use of org.eclipse.swtchart.extensions.linecharts.ILineSeriesSettings in project swtchart by eclipse.
the class LineSeries_Preferences_Part method applySeriesSettings.
private void applySeriesSettings() {
IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
Color lineColorSeries1 = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_LINE_COLOR_SERIES_1));
Color symbolColorSeries1 = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_SYMBOL_COLOR_SERIES_1));
Color lineColorSeries2 = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_LINE_COLOR_SERIES_2));
Color symbolColorSeries2 = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_SYMBOL_COLOR_SERIES_2));
Color lineColorSeries1Highlight = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_LINE_COLOR_SERIES_1_HIGHLIGHT));
Color symbolColorSeries1Highlight = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_SYMBOL_COLOR_SERIES_1_HIGHLIGHT));
Color lineColorSeries2Highlight = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_LINE_COLOR_SERIES_2_HIGHLIGHT));
Color symbolColorSeries2Highlight = getColor(PreferenceConverter.getColor(preferenceStore, LineSeriesPreferenceConstants.P_SYMBOL_COLOR_SERIES_2_HIGHLIGHT));
//
lineChart.deleteSeries();
List<ILineSeriesData> lineSeriesDataList = new ArrayList<ILineSeriesData>();
ISeriesData seriesData;
ILineSeriesData lineSeriesData;
ILineSeriesSettings lineSeriesSettings;
ILineSeriesSettings lineSeriesSettingsHighlight;
/*
* Series 1
*/
seriesData = SeriesConverter.getSeriesXY(SeriesConverter.LINE_SERIES_4_1);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setDescription(preferenceStore.getString(LineSeriesPreferenceConstants.P_DESCRIPTION_SERIES_1));
lineSeriesSettings.setAntialias(preferenceStore.getInt(LineSeriesPreferenceConstants.P_ANTIALIAS_SERIES_1));
lineSeriesSettings.setEnableArea(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_AREA_SERIES_1));
lineSeriesSettings.setEnableStack(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STACK_SERIES_1));
lineSeriesSettings.setEnableStep(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STEP_SERIES_1));
lineSeriesSettings.setLineColor(lineColorSeries1);
lineSeriesSettings.setLineStyle(LineStyle.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_LINE_STYLE_SERIES_1)));
lineSeriesSettings.setLineWidth(preferenceStore.getInt(LineSeriesPreferenceConstants.P_LINE_WIDTH_SERIES_1));
lineSeriesSettings.setSymbolColor(symbolColorSeries1);
lineSeriesSettings.setSymbolSize(preferenceStore.getInt(LineSeriesPreferenceConstants.P_SYMBOL_SIZE_SERIES_1));
lineSeriesSettings.setSymbolType(PlotSymbolType.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_SYMBOL_TYPE_SERIES_1)));
lineSeriesSettings.setVisible(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_SERIES_1));
lineSeriesSettings.setVisibleInLegend(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_IN_LEGEND_SERIES_1));
lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setAntialias(preferenceStore.getInt(LineSeriesPreferenceConstants.P_ANTIALIAS_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setEnableArea(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_AREA_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setEnableStack(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STACK_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setEnableStep(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STEP_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setLineColor(lineColorSeries1Highlight);
lineSeriesSettingsHighlight.setLineStyle(LineStyle.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_LINE_STYLE_SERIES_1_HIGHLIGHT)));
lineSeriesSettingsHighlight.setLineWidth(preferenceStore.getInt(LineSeriesPreferenceConstants.P_LINE_WIDTH_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setSymbolColor(symbolColorSeries1Highlight);
lineSeriesSettingsHighlight.setSymbolSize(preferenceStore.getInt(LineSeriesPreferenceConstants.P_SYMBOL_SIZE_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setSymbolType(PlotSymbolType.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_SYMBOL_TYPE_SERIES_1_HIGHLIGHT)));
lineSeriesSettingsHighlight.setVisible(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_SERIES_1_HIGHLIGHT));
lineSeriesSettingsHighlight.setVisibleInLegend(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_IN_LEGEND_SERIES_1_HIGHLIGHT));
lineSeriesDataList.add(lineSeriesData);
/*
* Series 2
*/
seriesData = SeriesConverter.getSeriesXY(SeriesConverter.LINE_SERIES_4_2);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setDescription(preferenceStore.getString(LineSeriesPreferenceConstants.P_DESCRIPTION_SERIES_2));
lineSeriesSettings.setAntialias(preferenceStore.getInt(LineSeriesPreferenceConstants.P_ANTIALIAS_SERIES_2));
lineSeriesSettings.setEnableArea(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_AREA_SERIES_2));
lineSeriesSettings.setEnableStack(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STACK_SERIES_2));
lineSeriesSettings.setEnableStep(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STEP_SERIES_2));
lineSeriesSettings.setLineColor(lineColorSeries2);
lineSeriesSettings.setLineStyle(LineStyle.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_LINE_STYLE_SERIES_2)));
lineSeriesSettings.setLineWidth(preferenceStore.getInt(LineSeriesPreferenceConstants.P_LINE_WIDTH_SERIES_2));
lineSeriesSettings.setSymbolColor(symbolColorSeries2);
lineSeriesSettings.setSymbolSize(preferenceStore.getInt(LineSeriesPreferenceConstants.P_SYMBOL_SIZE_SERIES_2));
lineSeriesSettings.setSymbolType(PlotSymbolType.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_SYMBOL_TYPE_SERIES_2)));
lineSeriesSettings.setVisible(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_SERIES_2));
lineSeriesSettings.setVisibleInLegend(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_IN_LEGEND_SERIES_2));
lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setAntialias(preferenceStore.getInt(LineSeriesPreferenceConstants.P_ANTIALIAS_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setEnableArea(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_AREA_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setEnableStack(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STACK_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setEnableStep(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_ENABLE_STEP_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setLineColor(lineColorSeries2Highlight);
lineSeriesSettingsHighlight.setLineStyle(LineStyle.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_LINE_STYLE_SERIES_2_HIGHLIGHT)));
lineSeriesSettingsHighlight.setLineWidth(preferenceStore.getInt(LineSeriesPreferenceConstants.P_LINE_WIDTH_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setSymbolColor(symbolColorSeries2Highlight);
lineSeriesSettingsHighlight.setSymbolSize(preferenceStore.getInt(LineSeriesPreferenceConstants.P_SYMBOL_SIZE_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setSymbolType(PlotSymbolType.valueOf(preferenceStore.getString(LineSeriesPreferenceConstants.P_SYMBOL_TYPE_SERIES_2_HIGHLIGHT)));
lineSeriesSettingsHighlight.setVisible(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_SERIES_2_HIGHLIGHT));
lineSeriesSettingsHighlight.setVisibleInLegend(preferenceStore.getBoolean(LineSeriesPreferenceConstants.P_VISIBLE_IN_LEGEND_SERIES_2_HIGHLIGHT));
lineSeriesDataList.add(lineSeriesData);
//
lineChart.addSeriesData(lineSeriesDataList, LineChart.HIGH_COMPRESSION);
}
use of org.eclipse.swtchart.extensions.linecharts.ILineSeriesSettings in project swtchart by eclipse.
the class LineSeries_10_Part method initialize.
private void initialize() throws Exception {
/*
* Chart Settings
*/
IChartSettings chartSettings = getChartSettings();
chartSettings.setCreateMenu(true);
applySettings(chartSettings);
/*
* Create series.
*/
List<ILineSeriesData> lineSeriesDataList = new ArrayList<ILineSeriesData>();
//
ISeriesData seriesData;
ILineSeriesData lineSeriesData;
ILineSeriesSettings lineSeriesSettings;
/*
* Chromatogram [0]
*/
seriesData = SeriesConverter.getSeriesXY(SeriesConverter.LINE_SERIES_1);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(true);
ILineSeriesSettings lineSeriesSettingsHighlight = (ILineSeriesSettings) lineSeriesSettings.getSeriesSettingsHighlight();
lineSeriesSettingsHighlight.setLineWidth(2);
lineSeriesDataList.add(lineSeriesData);
/*
* Active Peaks [1]
*/
indexSeries = 1;
seriesData = SeriesConverter.getSeriesXY(SeriesConverter.LINE_SERIES_1_ACTIVE_PEAKS);
lineSeriesData = new LineSeriesData(seriesData);
lineSeriesSettings = lineSeriesData.getLineSeriesSettings();
lineSeriesSettings.setEnableArea(false);
lineSeriesSettings.setLineStyle(LineStyle.NONE);
lineSeriesSettings.setSymbolType(PlotSymbolType.INVERTED_TRIANGLE);
lineSeriesSettings.setSymbolSize(5);
lineSeriesSettings.setLineColor(getDisplay().getSystemColor(SWT.COLOR_GRAY));
lineSeriesSettings.setSymbolColor(getDisplay().getSystemColor(SWT.COLOR_GRAY));
lineSeriesDataList.add(lineSeriesData);
/*
* Set series.
*/
addSeriesData(lineSeriesDataList);
/*
* Add the label marker.
*/
IPlotArea plotArea = (IPlotArea) getBaseChart().getPlotArea();
LabelMarker labelMarker = new LabelMarker(getBaseChart());
List<String> labels = new ArrayList<String>();
labels.add("[1]");
labels.add("[2]");
labels.add("[3]");
labels.add("[4]");
labels.add("[5]");
labels.add("[6]");
labels.add("[7]");
labels.add("[8]");
labels.add("[9]");
labels.add("[10]");
labelMarker.setLabels(labels, indexSeries, SWT.HORIZONTAL);
plotArea.addCustomPaintListener(labelMarker);
}
Aggregations