|
Black multi line charts |
Posted by No on Nov-09-2011 18:40 |
|
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
|
Re: Black multi line charts |
Posted by Peter Kwan on Nov-09-2011 19:58 |
|
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
|
Re: Black multi line charts |
Posted by No on Nov-09-2011 21:57 |
|
Hi
That was exactly it!
Thanks |
|