How to displace the origin of the Y axis on a polar Mschart?

断了今生、忘了曾经 提交于 2020-01-13 05:56:22

问题


Im working on a polar chart with mschart, and I need to make this "hole" on the middle of the chart. I mean, i need the "0" of the Y axis not to be on the center. I saw this plot somewhere on stackoverflow. It´s exactly what i need, how can I do that?


回答1:


In order to create a radar plot that look like the provided example

// disable grid a long X
chart1.ChartAreas[0].AxisX.MajorGrid.Enabled = false;
chart1.ChartAreas[0].AxisX.MajorTickMark.Enabled = false;

// set Y axis
chart1.ChartAreas[0].AxisY.Minimum = -20;  // creates the 'hole' by setting min Y
chart1.ChartAreas[0].AxisY.MajorGrid.IntervalOffset = 20; // so the major grid does not fill the 'hole'
chart1.ChartAreas[0].AxisY.MajorGrid.Interval = 5;
chart1.ChartAreas[0].AxisY.MajorGrid.LineDashStyle = ChartDashStyle.Dash;


来源:https://stackoverflow.com/questions/11083881/how-to-displace-the-origin-of-the-y-axis-on-a-polar-mschart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!