I want to add a different line chart at one time to my chart, so I have a text box with a button Load code from code input and my database. The problem is that the new line series overrides the old line chain. So I decided to keep the path of the series added to Gridview, I want to fill the loop and chart through it; Same result.
This is my code
Zero AddSerie (string stockName) {try {Legend legend = new legend (stockName); Chart1.Legends.Add (narrative); Chain series = new series (stockname); Chart1.Series.Add (series); String [] _data = new string [3]; _data [0] = stockname; _data [1] = "2010-01-01"; _data [2] = "2015-03-15"; Dataset ds = dbsechle (_ditta, "web_provis_series"); Chart1.DataSource = DS; Chart 1 Series [stockname]. XValueMember = "tdate"; Chart 1 Series [stockname]. YValueMembers = "value"; Chart 1 Series [stockname] .CharType = SeriesChartType.Line; Chart1.DataBind (); } Hold (exception) {throw; }}
In this way I call method
foreach (GridViewRow line in GridView1.Rows) {if (row.RowType == DataControlRowType .DataRow) {Adri (line Seals [0]. Text); }}
And I'm showing two series but the chart shows only one row.
I marked this image Using the style, two companies have been added to show the second output of the chart.
This is an example I want to achieve
This is the structure of the table
Any help? Instead of using the database, I have used another method: Chart 1
Series [0]. Points.AdxI (exclusives, yale);
Zero AddSerie (string stockName) {try {Legend legend = new legend (stockName); Chart1.Legends.Add (narrative); Chain series = new series (stockname); Chart1.Series.Add (series); String [] _data = new string [3]; _data [0] = stockname; _data [1] = "2010-01-01"; _data [2] = "2015-03-15"; Dataset ds = dbsechle (_ditta, "web_provis_series"); Chart1.DataSource = DS; Chart 1 Series [stockname]. XValueMember = "tdate"; Chart 1 Series [stockname]. YValueMembers = "value"; Chart 1 Series [stockname] .CharType = SeriesChartType.Line; Foreign currency (Datatrera row in Dtibles [0] .ro) {Chart 1. Series [stockname]. Points AdxI (line [0], line [1]); } // chart 1.Datind (); } Hold (exception) {throw; }}
No comments:
Post a Comment