1
Answer

ASP.NET Chart control problem

Sreekanth

Sreekanth

13y
2.8k
1
hi ,
I am trying to create the graph shown below in asp.net using chart controls


My data table contain tw0 columns for X axis (Date Type) and Y axis (Double Type) values - ()below)

mydatatable




.aspx code 
<asp:Chart ID="chartTest" Width="750px" EmptyChartText="Data Not Available."  Height="500px"  runat="server">
    <Series>
         <asp:Series ChartType="Line" ChartArea="chartArea" Name="series" ></asp:Series>
    </Series>
    <ChartAreas>
         <asp:ChartArea Name="chartArea">
            <AxisX  IsStartedFromZero="true" Interval="15" IntervalType="Minutes" >
            <LabelStyle Interval="15" IntervalType="Minutes"  />
            </AxisX>
         </asp:ChartArea>
    </ChartAreas>
    </asp:Chart>

vb code 

chartTest.DataSource=mydatatable
 chartTest.Series(0).XValueMember =XDate
chartTest.Series(0).YValueMembers =YValue



i am getting the graph correctly but some problems in the labels in the X axis . Its not showing anything

Now graph look this


pls help
Answers (1)