问题
I am a novice programmer using ms chart control for my dashboard, I have a problem displaying chart series.
Here is my sample query & result
Sample Query: "SELECT Brand, sales, Manufacturer From TABLE"
Sample Result:
BRAND SALES MANUFACTURER
Row 1 BrandA 10000 MfgA
Row 2 BrandY 7000 MfgY
Row 3 BrandZ 12000 MfgZ
How can I display BrandA for XValueMember & Salesvalue(10000) for YValueMembers as Series1 having a column chart type.
And to display BrandY & BrandZ for XValueMember ; Salesvalue for YValueMembers as Series2 having a line chart type.
I want my chart to have 2 Y-axis; Series1 for primary Y-axis & series2 for secondary Y-axis.
My problem here is how can I display BrandA in Series1 and BrandY,BrandZ in Series2 where the values are in the same field?
Or is it possible to set more than one data source for the chart control?
I've been working on this for two days but I wasn't able to get the desired result.
I hope somebody could help me.
回答1:
Dont know how to achieve that with MSChart.
In this project, has a sample of a "column combination chart" where you are able to display one brand as a column(primary) e the other as a line(secundary).
http://liberofusioncharts.codeplex.com/
Download it and take a look at Column Combination Chart sample available for ASP.Net Webforms.
来源:https://stackoverflow.com/questions/4601805/multiple-chart-series-in-chart-control