How to make WinForms chart control primary Y axis to be drawn on both sides of the chart?

StackOverflow https://stackoverflow.com/questions/22124533

  •  18-10-2022
  •  | 
  •  

سؤال

Y axis and its level labels are only drawn on the left by default while the right side appears unbordered and unlabelled. How to make them to be duplicated on the right side?enter image description here

هل كانت مفيدة؟

المحلول

The Primary Y-Axis can't be duplicated to draw in the right side. You have to use Secondary Y-Axis for that.

chart1.ChartAreas[ChartName].AxisY2.Enabled = AxisEnabled.True;

Enabling this duplicates the primary axis values in the right side.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top