|
Bar layer border color |
Posted by L on Oct-22-2011 00:34 |
|
Hello,
I am using a bar layer with several datasets and the touchbar property to properly fill the
space (layer.setBarGap (Chart.TouchBar, Chart.TouchBar)). I have a border color set on
the layer (for default), but I'd also like to change the border color on one particular data
set, using addDataSet().setDataColor(datacolor, bordercolor).
This works almost perfectly, but my default border color does not extend all the way to the
far end of the datasets that are using it. It seems the touchbar property makes it so the
border color is determined by the right data set, so even if that dataset's edge color is
Transparent, you won't see the border color of the previous data set on that trailing edge.
Is there any way I can control that? I tried playing with the order that my data sets are
added, but I couldn't make it happen.
Thanks!
L |
Re: Bar layer border color |
Posted by Peter Kwan on Oct-22-2011 03:13 |
|
Hi L,
For your case, instead of using Chart.Transparent, please use an almost transparent color, such as (in VB.NET) &Hfeffffff.
In "Touch Bar", two adjacent bars share the same border. So it is ambiguous which border color should be used for the shared border if the bars uses different border colors. In ChartDirector, the border will be colored based on the right bar. It is because for a 3D bar chart, the right bar is "visibly" in front of the left bar (the right bar blocks part of the left bar), so for consistency, we assume the right bar is in front of the left bar even in 2D.
Furthermore, if Transparent is used as the border color, ChartDirector will treat it to mean the border color is the same as the fill color. (If the border color is really treated as transparent, there will be a gap between the bars and they are not touched at all.) Using an almost transparent color can suppress this behaviour.
Hope this can help.
Regards
Peter Kwan |
|