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

Message ListMessage List     Post MessagePost Message

  Black multi line charts
Posted by No on Nov-09-2011 18:40
Attachments:
Hello,

When building multiline charts with ChartDirector for C++ (tested with 3.1 and 4.0), colored lines sometimes become black. It seems to happen when exactly 3 lines are in the chart.
I join two charts generated with the same code. One is ok, the other exhibits this bug.

Thank you for your feedback,

No
4F4A54974EBA6CF0.png
4F4A54BE4EBA6CF1.png

  Re: Black multi line charts
Posted by Peter Kwan on Nov-09-2011 19:58
Attachments:
Hi No?,

I believe it is because your code is creating 3D lines for some of your data series. You can see that the plot area is in 3D (there is a depth), so there must be some 3D layers in your chart.

I have attached a 3D line chart for your reference. You can see a 3D line is actually a "strip". The strip has two colors - a fill color (which is red/green/blue in the attached chart), and a border color (which is black in the attached chart). If your 3D line is very thin (with a very small 3D depth), the fill color will not be visible, and you end up seeing the border color only (which is black by default).

I think it is unlikely you really want to create a 3D line that thin, so I suspect it is due to an accidential mistake in your charting code. For example, you may have a line like:

LineLayer *layer = c->addLineLayer(Chart::Side, 3);
layer->addDataSet(.....);
layer->addDataSet(.....);
layer->addDataSet(.....);

The above line means to add a 3D line layer with a 3D depth of 3 pixels. If you really do not intend to create a 3D line, the code should be:

LineLayer *layer = c->addLineLayer();
layer->addDataSet(.....);
layer->addDataSet(.....);
layer->addDataSet(.....);

Hope this can help.

Regards
Peter Kwan
threedline_g.png

  Re: Black multi line charts
Posted by No on Nov-09-2011 21:57
Hi

That was exactly it!

Thanks