I have a data as below
- Date = 10,10,2014 , Value = 100
- Date = 10,11,2014 , Value = 20
- Date = 10,11,2014 , Value = 200
- Date = 10,12,2014 , Value = 80
these data are originated from SQL db .
Using asp.net chart . I pass the select command to a SQL Data source .
something like this
SELECT OrderTb.OrderDate As Date,
ProductTb.ProductPrice * OrderProductTb.ProductAmount AS Value
FROM OrderTb
INNER JOIN OrderProductTb ON OrderTb.OrderID = OrderProductTb.OrderId
INNER JOIN ProductTb ON OrderProductTb.ProductId = ProductTb.ProductID
ORDER BY OrderTb.OrderDate DESC
Will return 2 columns something similar as above data example .
My problem is . when i render the Asp.net Chart . For the date 10,11,2014 . the bar chart doesnt add the value for that date . it only show the highest value which is 200 and not 220 .
Below are my asp.net chart control .
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1"
Width="600px" >
<Series>
<asp:Series Name="Series1" XValueMember="OrderDate" XValueType="Date" YValueType="Auto"
YValueMembers="Value"
>
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<axisy>
<MajorGrid Enabled ="False" />
</axisy>
<axisx>
<MajorGrid Enabled="false"/>
</axisx>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:AuthenticationDBConnectionString %>"
SelectCommand="">
</asp:SqlDataSource>
Is there any way that i can sum the value up on that date , Tq in advance