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

Message ListMessage List     Post MessagePost Message

  How to pass partial number of colors to a dataset in Bar Chart
Posted by Adamraju on Nov-14-2023 22:35
Hi Team ,

I have a bar chart - with 10 legends. Out of 10 - I have to pass 5 colors to be fixed ( that I Can pass) and  remaining legend colors to be taken by chardirector automatically.

Barlayer layer= XYChart.Barlayer2(Chart.Stack,0);
layer.addDataSet(dataset,HexaColorcode,legendName);

we are looking for HexaColorcodes - few to be fixed and few to be dynamic in a single barchart.

Please provide ur thoughts

  Re: How to pass partial number of colors to a dataset in Bar Chart
Posted by Peter Kwan on Nov-15-2023 04:21
Hi Adamraju,

If the color is fixed for a dataset, please use that color in addDataSet.

If the color is to be automatically allocated by ChartDirector, you can use -1 as the color for that data set.

Best Regards
Peter Kwan