2012-03-06 10 views
2

私はC#フォームでチャートを使用しています。私はそのチャートの値を更新するアクションを持っていますが、値が最大値を取得すると、彼らはグラインドアウトします。 Y軸で最大値を変更するにはどうすればよいですか?以下は値を更新する方法です。Y軸の縮尺を変更

int[] TempScore= new int[100]; 
for (int i = 0; i < ScoreChart.Series["Players"].Points.Count(); i++) 
{ 
    TempScore[i] = Convert.ToInt32(ScoreChart.Series["Players"].Points[i].YValues[0]); 
    ScoreChart.Series["Players"].Points[i].YValues[0]+=PlayersScore; 
} 
ScoreChart.Series.Clear(); 
ScoreChart.Series.Add("Players"); 
for (int i = 0; i < Convert.ToInt32(NumberOfPlayer.Text); i++) 
{ 
    ScoreChart.Series["Players"].Points.Add(0).Label = "Gracz " + i; 
    ScoreChart.Series["Players"].Points[i].YValues[0] = TempScore[i] + 1; 
} 
+0

? –

+0

@rdkleine私はあなたが 'System.Windows.Forms.DataVisualization.Charting;を使ってそれについて尋ねると思うと思います。 –

答えて

2

は、.NET 4.0でチャートを使用している場合は、次のようにYの最大値を設定することができます:あなたが使用しない制御

chart.ChartAreas[0].AxisY.Maximum = 10; 
関連する問題