ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Can I add symbols to a mark line
Posted by David Hope on Jan-14-2015 04:57
I'm using an XYChart with a ContourLayer, then using layers coloraxis to draw lines on the contours (I want to be able to draw the lines with different colors and dashes).

My chart creation code basically looks like this (C#):

-------------------------------------------------------------------------
    XYChart c = new XYChart(width, height)

    ContourLayer layer=c.addContourLayer(dataX, dataY, dataZ)

    layer.setContourColor(Chart.Transparent);
    ColorAxis cAxis = layer.colorAxis();

    foreach(Threshold t in Thresholds)
    {
        var mark = cAxis.addMark(t.value, c.dashLineColor(t.color, t.dash));
        mark.setLineWidth(2);
    }

    viewer.Chart = c;
-------------------------------------------------------------------------

I'd like to be able to put symbols on the markline (like you can do with the setDataSymbol on the DataSet class).

Thanks,
David

  Re: Can I add symbols to a mark line
Posted by Peter Kwan on Jan-14-2015 23:27
Hi David,

In all ChartDirector charts, the symbols can only be added to a data point. For a normal line
chart, you can see the symbols are only for the data points, and does not exist on other
parts of the line.

As a mark line does not have any data points, it cannot have symbols. Even the mark lines
in XYChart do not have symbls.

If your code can provide some points at the threshold values, you can use a scatter layer
to add symbols at those positions.

Regards
Peter Kwan

  Re: Can I add symbols to a mark line
Posted by David Hope on Jan-14-2015 23:42
Is there any easy way to pull the data points for the mark line out of the chart?

  Re: Can I add symbols to a mark line
Posted by Peter Kwan on Jan-16-2015 01:05
Hi David,

Unluckily, there is no API to obtain the points. It is because ChartDirector does not keep
track of the points. Basically, if forget the points (free the memory) after drawing the
curve, so the points cannot be retrieved afterwards.

Regards
Peter Kwan