sooprise
sooprise

Reputation: 23207

How to make ZedGraph bars overlap?

For a particular task, I need bars on my bar graph to overlap. Currently, if two bars from two different data sets have the same x value, they are set apart from each other instead of both originating at the actual x value.

How can I force ZedGraph to add bars that land exactly on their x values, even if there is more than one bar with the same x value. When they're separated, they're not even moved from the actual x value by the same amount, so it just looks really bad.

Thanks.

Upvotes: 1

Views: 1039

Answers (1)

JYelton
JYelton

Reputation: 36546

The default format for bar charts is BarType.Cluster, but it seems you probably want BarType.Overlay.

Try setting the following property:

zedGraphControl1.GraphPane.BarSettings.Type = BarType.Overlay;

Reference: Zedgraph at CodeProject

Upvotes: 1

Related Questions