|
changing border color for each bar segment in a stacked bar |
Posted by Ryan Gray on Apr-12-2017 12:36 |
|
I have a stacked bar chart and cannot figure out if there is any way to change the border style for each individual data set in the stacked bar rather than have it apply to the whole layer. Right now I have:
BarLayer myLayer = chrtReport.addBarLayer(Chart.Stack);
myLayer.setBorderColor(Chart.Transparent);
but when I add my datasets I want to be able to do something like:
myLayer.addDataSet(...).setBorderColor(Chart.Transparent);
myLayer.addDataSet(...).setBorderColor(0x00000);
myLayer.addDataSet(...).setBorderColor(0x00ff00);
....
Is there any way to accomplish this? |
Re: changing border color for each bar segment in a stacked bar |
Posted by Peter Kwan on Apr-13-2017 05:47 |
|
Hi Ryan,
Yes, you can do that. The code is like:
layer.addDataSet(data0, -1, "AAA").setDataColor(fillColor0, borderColor0);
layer.addDataSet(data1, -1, "BBB").setDataColor(fillColor1, borderColor1);
layer.addDataSet(data2, -1, "CCC").setDataColor(fillColor2, borderColor2);
Hope this can help.
Regards
Peter Kwan |
Re: changing border color for each bar segment in a stacked bar |
Posted by Ryan Gray on Apr-13-2017 09:07 |
|
Thanks!
Also, if I wanted to give a glass effect for just a certain data set, would it look something like this:
myLayer.addDataSet(array[]).setDataColor(aboveLineColors[i], Chart.Transparent,
Chart.glassEffect(1, Chart.Left), 0x00000);
Because I gave this a try and was just getting the color with no effect added? Any ideas? |
Re: changing border color for each bar segment in a stacked bar |
Posted by Peter Kwan on Apr-14-2017 01:51 |
|
Hi Ryan,
Unluckily, the data set only has configurable fill and edge colors. The shading effect is only configurable per layer, not per data set.
Regards
Peter Kwan |
|