It may seem strange that I want to plot a chart with an empty series.
But here is the deal. My chart displays data from a database between two dates that are provided to a stored procedure.
The result is this:
2011-08-05 - 37,5 2011-08-11 - 20,1 2011-08-16 - 8,0 2011-08-17 - 15,7
The x axis is plotted on a graph with dates. And the y axis is plotted with numbers (decimal places).
There is no problem building them.
But I want this:
2011-08-01 - 0 2011-08-02 - 0 ^ etc. v 2011-08-05 - 37,5 2011-08-06 - 20,1 2011-08-07 - 8,0 2011-08-08 - 15,7 ^ etc. v 2011-08-30 - 0 2011-08-31 - 0
Can someone give me a hint?
My code is as follows:
<asp:Chart ID="Chart_NormalRegistrations" runat="server" Height="650px" Width="975px" DataSourceID="SqlDataSource1" Palette="Bright"> <Series> <asp:Series Name="Series1" XValueMember="Dato" XValueType="DateTime" ChartArea="" YValueMembers="Total" YValueType="Double" YValuesPerPoint="1"> </asp:Series> </Series> <ChartAreas> <asp:ChartArea Name="ChartArea1"> <AxisY Title="Tid" Interval="5"> </AxisY> <AxisX Title="Dage" Interval="1"> </AxisX> <Area3DStyle Enable3D="True" /> </asp:ChartArea> </ChartAreas> </asp:Chart> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString=" //connectionstring" SelectCommand="stored_proc_regs" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter DefaultValue="2011-08-01" Name="from" Type="DateTime" /> <asp:Parameter DefaultValue="2011-09-01" Name="to" Type="DateTime" /> </SelectParameters> </asp:SqlDataSource>
source share