Hi Maurice,
As according to the ChartDirector documentation, TouchBar means the bars are touched so
that their borders overlap. (If the borders do not overlap, then it would appear there is a
doubly thick border between the two bars.)
If you are using semi-transaprent border colors, you can see that the shared border will be
painted twice with the two border colors of the two bars. Even if the two border colors are
the same, painting the border twice will result in the border being less transparent than if
the border is only painted once. This may appear as a darker border if you are using a
border color darker than the background color.
The setBarGap(0) means the bar gap will be as close to 0 as possible, subjected to the
constraint that all bars must be of equal width in pixels. If you have 10 bars, and the plot
area width is 185 pixels, it is not possible for the bars to be of equal width and will zero
gaps at the same time. In this case, the bars will be set to 18 pixels in width, and there will
be 5 extra pixels unused, and distributed as gaps among the bars. To avoid the gaps, one
method is to set the plot area width to a multiple of the number of bars. In C#, the code is
like:
int plotAreaWidth = 434; //just an example
int barCount = 9;
//adjust plotAreaWidth to a mulitple of barCount
plotAreaWidth = plotAreaWidth / barCount * barCount;
Regards
Peter Kwan |