Search in sources :

Example 1 with SeriesLabelMarker

use of org.eclipse.swtchart.extensions.internal.marker.SeriesLabelMarker in project swtchart by eclipse.

the class ScrollableChart method setSeriesLabelMarker.

private void setSeriesLabelMarker() {
    IPlotArea plotArea = (IPlotArea) baseChart.getPlotArea();
    IChartSettings chartSettings = baseChart.getChartSettings();
    // 
    if (seriesLabelMarker != null) {
        plotArea.removeCustomPaintListener(seriesLabelMarker);
    }
    // 
    seriesLabelMarker = new SeriesLabelMarker(baseChart);
    seriesLabelMarker.setForegroundColor(chartSettings.getColorSeriesLabelMarker());
    plotArea.addCustomPaintListener(seriesLabelMarker);
    // 
    if (chartSettings.isShowSeriesLabelMarker()) {
        seriesLabelMarker.setDraw(true);
    } else {
        seriesLabelMarker.setDraw(false);
    }
}
Also used : SeriesLabelMarker(org.eclipse.swtchart.extensions.internal.marker.SeriesLabelMarker) IPlotArea(org.eclipse.swtchart.IPlotArea)

Aggregations

IPlotArea (org.eclipse.swtchart.IPlotArea)1 SeriesLabelMarker (org.eclipse.swtchart.extensions.internal.marker.SeriesLabelMarker)1