Search in sources :

Example 1 with AxisZeroMarker

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

the class ScrollableChart method setAxisZeroMarker.

private void setAxisZeroMarker() {
    IPlotArea plotArea = (IPlotArea) baseChart.getPlotArea();
    IChartSettings chartSettings = baseChart.getChartSettings();
    // 
    if (axisZeroMarker != null) {
        plotArea.removeCustomPaintListener(axisZeroMarker);
    }
    // 
    axisZeroMarker = new AxisZeroMarker(baseChart);
    axisZeroMarker.setForegroundColor(chartSettings.getColorAxisZeroMarker());
    plotArea.addCustomPaintListener(axisZeroMarker);
    // 
    if (chartSettings.isShowAxisZeroMarker()) {
        axisZeroMarker.setDraw(true);
    } else {
        axisZeroMarker.setDraw(false);
    }
}
Also used : AxisZeroMarker(org.eclipse.swtchart.extensions.internal.marker.AxisZeroMarker) IPlotArea(org.eclipse.swtchart.IPlotArea)

Aggregations

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