We help IT Professionals succeed at work.

asp.net charting

If have the below code that generates a chart for data in a database.  It works fine except that when the parameter dictating the data column in the database to use is changed in some cases it does not display the line in the chart.  The only difference is that the lines that are not display have the same yvalue - straight horizontal line.

I need to display the as a straight line.  The chart the shows up shows a single xaxis lable in the center (Date) of the axis and ofcourse no plotted points.  I have verified the database shows data in the colummn and all are at a value.

Any help would be approciated.

Watch Question

Isn't because of the same value, all the lines get overlapped in the chart?


I forgot to include I refered to in my original post.

<asp:Chart ID="chtCHART1" runat="server" DataSourceID="SqlDataSource7"
            Width="920" BackColor="Black" EnableViewState="True"
            BackImageAlignment="TopLeft" BorderSkin-BackHatchStyle="LightHorizontal"
            BorderSkin-BackGradientStyle="TopBottom" BorderlineWidth="5" ViewStateMode="Enabled"
<asp:Series ChartType="Line" Name="Series1" XValueMember="DateTime"
            XValueType="Time" YValueMembers="Value" YValueType="Double"
            BorderColor="Silver" BorderWidth="2" Color="#66CCFF" IsXValueIndexed="True"
<EmptyPointStyle BackImageTransparentColor="Transparent"
                BackSecondaryColor="Transparent" BorderColor="Transparent"
                BorderDashStyle="NotSet" Color="Transparent" IsVisibleInLegend="False"
                LabelBackColor="Transparent" LabelBorderColor="Transparent"
                LabelBorderDashStyle="NotSet" LabelForeColor="Transparent" />

<asp:ChartArea Name="ChartArea1" BackColor="Transparent"
            BackSecondaryColor="Silver" BorderColor="Silver" BorderWidth="24"
            ShadowColor="Transparent" AlignmentOrientation="Horizontal">
<AxisY IsLabelAutoFit="False" LineColor="Gray" LineWidth="2"
                Title="Units" TitleFont="Microsoft Sans Serif, 8pt, style=Bold"
                TitleForeColor="#66CCFF" >
<MajorGrid LineColor="#585858" />

<LabelStyle ForeColor="#66CCFF" />

<AxisX IsLabelAutoFit="False" LineColor="Gray" LineWidth="2" Title="Date"
                TitleFont="Microsoft Sans Serif, 8pt, style=Bold" TitleForeColor="#66CCFF"
                LabelAutoFitMinFontSize="8" Interval="Auto" LabelAutoFitStyle="DecreaseFont"
                IntervalAutoMode="VariableCount" IntervalType="Auto">
<MajorGrid Enabled="true" LineColor="#585858" Interval="Auto" />

<LabelStyle ForeColor="#66CCFF" />
<asp:Title BackColor="Transparent"
                Font="Microsoft Sans Serif, 10pt, style=Bold" ForeColor="#66CCFF" Name="Title1"
                Text="Line 4 Dancer3 Arm Scaled Value">



There is only one series plotted in this chart.  What do you mean by all the lines get overlapped?


The chart only plots a change in value.  Doe anyone know how to resolve this?
The problem was with the query.  It was only picking changes in value change to a cyclic count and it corrected the problem.


I found the resolution to the problem.  Expert did not help with it.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.