我想绘制一个包含主Y轴和辅助Y轴以及公共X轴的mschart。这是可能的重复,但我没有找到我正在寻找的解释:
Charts multi type and secondary Y axis
我需要一些关于如何使用MSChart
答案 0 :(得分:0)
ChartArea chartarea = new ChartArea();
Series Memory = new Series();
RepeatsMemoryPlot.Series.Add(Memory);
//Add points to series Memory
Memory.Points.AddXY(a, b);
Series Time = new Series();
RepeatsMemoryPlot.Series.Add(Time);
Time.ChartArea = Memory.ChartArea;
Time.YAxisType = AxisType.Secondary;
//Add Points to time series
Time.Points.AddXY(a, b);
答案 1 :(得分:0)
在ChartArea中,选择Axis,然后选择Secondary Y(值)轴 并将Enabled从Auto更改为True
第二个轴将显示