2017-08-22 3 views
0

グラフが表示されず、エラーもありません。 誰でも私のチャートがプロットではなく、何が間違っているのかを私に示唆することができます。C#のグラフコントロール

+0

が初期化されていないChart1.Seriesような音:我々はまた、次のように

enter image description here

はあなたのコードを変更してChartTypeをに変更することができます。 – Steve

+0

グラフにシリーズを追加していないようです。特にチャートオブジェクトを作成してシリーズを追加する場所で、より多くのコードを表示できますか? – Diado

+0

[IndexOutOfRangeException/ArgumentOutOfRangeExceptionとは何ですか?]と重複していますが、どうすれば解決できますか?(https://stackoverflow.com/questions/20940979/what-is-an-indexoutofrangeexception-argumentoutofrangeexception-and-how-do-if) – Rohit416

答えて

0

ここで欠けているものは、新しくシリーズをチャートシリーズに追加することです。

​​
0

まず、チャートのプロパティを設定する必要があります。

ステップ1:グラフのプロパティに移動し、シリーズをクリックします。

enter image description here

ステップ2:シリーズの名前を変更します。ここでは、名前をCaseに設定しました。

chart1.DataSource = ds; 
    //set the member of the chart data source used to data bind to the X-values of the series 
    chart1.Series["Case"].XValueMember = Convert.ToString(x); 
    //set the member columns of the chart data source used to data bind to the X-values of the series 
    chart1.Series["Case"].YValueMembers = Convert.ToString(y); 
    chart1.Titles.Add("Case"); 
+0

@Mehul_Ladこれは完全に使いたいと思う。 –

関連する問題