Multi-category bar chart with separate axes scales


I am trying to create a multiple category bar chart where series[0] has a data scale of 0…30 and series[1] has a data scale of 0…5 at 0.5 major interval.

I can render the chart as shown in the attached image, however; I cannot figure out how to create the axes label for the right side of the chart (indicated by arrow in image).

I used the AutomaticChartSeriesColor example as the basis of the mockup.

Attachment: multi-cat-bar-missing-axes label.png (17.1 KB)



I have observed your requirements and suggest you to please visit this documentation link for your kind reference. Please look for code sample setting chart major and minor axis values. These are actually what you need to set in your case.

// Setting chart maximum, minimum values

chart.Axes.VerticalAxis.IsAutomaticMajorUnit = false;

chart.Axes.VerticalAxis.IsAutomaticMaxValue = false;

chart.Axes.VerticalAxis.IsAutomaticMinorUnit = false;

chart.Axes.VerticalAxis.IsAutomaticMinValue = false;
chart.Axes.VerticalAxis.MaxValue = 5.0f;

chart.Axes.VerticalAxis.MinValue = 0.0f;

chart.Axes.VerticalAxis.MinorUnit = 0.5f;

chart.Axes.VerticalAxis.MajorUnit = 0.5f;

I hope the shared elaboration will be helpful.