All,
I have a datatable with the following type of information
Year Cars Trucks Planes
2011 12 20 2
2012 10 21 1
2013 9 9 3
What I get with my chart control is a column chart where the x-axis is labeled by the Year and the y-axis is the values of the other three items.
| . .
| .. .. ..
| .. .. ...
| ... ... ...
|---2011-----2012------2013
What I want is the items grouped by the x-axis and then year as follows with the year being legend
| ..
| ... ...
| ... ... .
| ... ... ...
|---Cars-----Trucks----Planes
How can I do this? Here is my chart control:
<asp:chart id="chartVehicleData" runat="server" height="412px" imagestoragemode="UseHttpHandler" width="880px" >
<asp:series chartarea="MainChartArea" xvaluemember="FY" yvaluemembers="Cars" charttype="Column" name="CarsSeries">
<asp:series chartarea="MainChartArea" xvaluemember="FY" yvaluemembers="Trucks" charttype="Column" name="TrucksSeries">
<asp:series chartarea="MainChartArea" xvaluemember="FY" yvaluemembers="Planes" charttype="Column" name="PlanesSeries">
<asp:legend name="Legend1" docking="Right" alignment="Center" isdockedinsidechartarea="true">
<asp:chartarea name="MainChartArea">
When the user goes to the web page, fills in a date range, and clicks a button, they get a datatable with the info and a chart.
I bind with the following commands:
chartvehicledata.datasource = mydatatable
chartvehicledata.databind()
Thanks for any help you can give. This has been driving me nuts
Ken