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

Message ListMessage List     Post MessagePost Message

  LineLayer with different colors
Posted by Hidy Paul on Oct-24-2011 20:54
Attachments:
Dear Support,

Could you please help me how can I add different colours and  "legends" to Area Layers in the case of Version 5.-for example in the case of  5Vers.jpg?
(Code : addLineLayer(DoubleArray data, int color = -1, const char *name = 0, int depth = 0))

I had no problem doing it with version 4.: It depicted a number of" Legends" each having its own colour. eg: 4Vers.jpg. I did not succeed with Version 5 though...

Thank you very much and best regards,
Paul Hidy
5Vers.jpg
4Vers.png

  Re: LineLayer with different colors
Posted by Peter Kwan on Oct-25-2011 03:53
Hi Hidy,

Are you sure the "version 4" chart you mentioned is created by ChartDirector?

As far as I know, ChartDirector cannot create the same style of area chart. However, if the chart is really created by ChartDirector Ver 4, the same code should also work in ChartDirector Ver 5. If you think the same code is not working, would you mind to inform me the code you use for the version 4 chart?

For your case, actually I suggest to use a multi-color bar chart instead of an area chart. Although I am not sure what the chart is plotting, I think the multi-color bar chart seems more appropriate for your data type. For example, "Frankreich" and "England" is joined together in the area chart, but I think they does not have any special relationship. Also, the legend is not too consistent with the chart. For example, "English" is of cyan color in the legend, but in the chart the cyan region joins "Frankreich" with "England" (the cyan region is drawn using the data points for both "Frankreich" with "England", not just from "England"). A multi-color bar chart should better reflect the data.

Hope this can help.

Regards
Peter Kwan