我在previous question中詢問如何爲極座標圖設置特定數量的環和扇區。我現在有一個按鈕,可以將圖表從極座標變爲雷達。問題是段數從24(正確)變爲25(錯誤)。我不知道爲什麼。將ChartType從Polar更改爲Radar
代碼設置的振鈴次數:
#region chartdesign
Series s = chartleft.Series[0]; // a reference to the default series
ChartArea ca = chartleft.ChartAreas[0]; // a reference to the default chart area
Axis ax = ca.AxisX;
Axis ay = ca.AxisY;
s.ChartType = SeriesChartType.Polar; // set the charttype of the series
s.Points.AddXY(0,0);
ax.Interval = 15;
ay.Interval = 1;
ax.IntervalOffset = 0;
ax.Minimum = 0;
ax.Maximum = 360;
ay.IntervalOffset = 0;
ay.Minimum = 0;
ay.Maximum = 10;
//----------------------------------------------------------------------
Series s2 = chartright.Series[0]; // a reference to the default series
ChartArea ca2 = chartright.ChartAreas[0]; // a reference to the default chart area
Axis ax2 = ca2.AxisX;
Axis ay2 = ca2.AxisY;
s2.ChartType = SeriesChartType.Polar; // set the charttype of the series
// a few data to test:
s2.Points.AddXY(0, 0);
ax2.Interval = 15;
ay2.Interval = 1;
ax2.IntervalOffset = 0;
ax2.Minimum = 0;
ax2.Maximum = 360;
ay2.IntervalOffset = 0;
ay2.Minimum = 0;
ay2.Maximum = 10;
#endregion
謝謝。只要你說雷達圖自己完成,我就知道我做錯了什麼。非常感謝。 –