I have a dataset that has many datatables which I want to attach to the chart with several column series. Expect different values related to datatables in datasets; However, when the chart appears, both series display the same values in the Y column, the values from the first tables
Here is a general idea that is my code:
(I have created and named database diffCharts, diffCharts table table 1 and table 2 in both tables is column month and amount )
chart 1. Series.Add ("table1"); Chart 1 Series ["Table 1"]. XValueMember = "month"; Chart 1 Series ["Table 1"]. YValueMembers = "zodiac"; Chart1.Series.Add ("table2"); Chart 1 Series ["Table 2"]. XValueMember = "month"; Chart 1 Series ["Table 2"]. YValueMembers = "zodiac"; Chart 1.DataSource = Diffhef Card; Chart1.DataBind (); Am I missing something? I have never compromised a dataset with multiple tables in a chart .... How does MS handle it?
I do not think you can do that.
You probably need to create a table in the form of a column of X axis (month) as a column, and then for two more column Y values which you want to graph.
The datatable class has a merge function, which can actually meet your needs.
Comments
Post a Comment