I have to create a chart looking like the example in the attached screenshot. You can see the underlying data from the table in the screenshot, too.
How would I best create such a chart from the given data?
My argument values are of type qualitative. I need to draw a step for each value in the "Values step" column of the data source. Also I need to draw a column for each value in the "Values bar" column of the data source. There are the following rules:
- each bar has to be exactly as wide as the corresponding step
- the position (in relation to the x axis) of bar and corresponding step has to be the same
- Each bar shows the difference between the both values. The color depends on which value is bigger.
Do you have any idea? I tried combining two series of type SideBySideRangeBar and StepLine. But I had two major problems:
- the distance between the bars is too big (should be 0)
- the step and the corresponding bar are always overlapping concerning their x position
Thanks and regards,
You can link your Bar series to a secondary axis X. And use its Range.MinValueInternal property to shift points. Use the BarWidth property to specify the bar width as a fraction of axis units (the distance between two major axis tickmarks).
Attached is a small sample project that demonstrates how to accomplish this.