Lets say we have a set of sample values (each one is between MinValue and MaxValue). And for each sample we need to do the following:
- Draw a bar representing MaxValue with a solid Gray color
- Draw a bar representing sample value with a gradient color: close to MinValue is green, middle is yellow, close to MaxValue is red
- Each sample's bar should be drawn just over MaxValue bar (as it looks like in TeeChart Gallery for a Bar chart): )
The only color that works is Transparent (and I have to add at least one point with MaxValue and Transparent color to force relative gradient to be calculated from the MaxValue).
So I was forced to add another bar with solid Gray color (and as many points to it as many samples I have). But now my two bars are displayed side-by-side, not one above another:
And my code for an image above looks like:
Code: Select all
bar1.Add(0, 500); bar1.Add(1, 500); bar1.Add(2, 500); bar2.Add(0, 500, Color.Transparent); bar2.Add(0, 125); bar2.Add(1, 350); bar2.Add(2, 450);
1) Is there a way to implement my task with a single bar?
2) If no - how can I display two bar series one over another?
Thank you in advance.