Link to home
Start Free TrialLog in
Avatar of emresamisuzer
emresamisuzer

asked on

MS Chart Control -Line Chart Problem

Hi,

I try to draw a line chart with the microsoft charting control (.net 3.5), but the line always closes on itself. I couldn't find why.
Chart1.Series("Series1").ChartType = DataVisualization.Charting.SeriesChartType.Line
Chart1.Series("Series1").Points.AddXY(New Date(2010, 1, 2), 10)
Chart1.Series("Series1").Points.AddXY(New Date(2010, 1, 5), 20)
Chart1.Series("Series1").Points.AddXY(New Date(2010, 1, 6), 50)

<asp:Chart ID="Chart1" runat="server" Palette="BrightPastel" BackColor="#FFFFFF"
                                    ImageType="Png" ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)" Width="800px"
                                    Height="500px" BorderDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="1"
                                    BorderColor="181, 64, 1" BorderSkin-SkinStyle="None">
                                    <Legends>
                                        <asp:Legend Enabled="True" IsTextAutoFit="True" Name="Default" BackColor="Transparent"
                                            Font="Trebuchet MS, 10px, style=Bold">
                                        </asp:Legend>
                                    </Legends>
                                    <BorderSkin SkinStyle="Emboss"></BorderSkin>
                                    <Series>
                                        <asp:Series MarkerSize="5" BorderWidth="1" XValueType="DateTime" Name="Series1" ChartType="Line"
                                            MarkerStyle="Circle" ShadowColor="Black" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240"
                                            ShadowOffset="2" YValueType="Double">
                                        </asp:Series>
                                    </Series>
                                    <ChartAreas>
                                        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid"
                                            BackSecondaryColor="White" BackColor="OldLace" ShadowColor="Transparent" BackGradientStyle="TopBottom">
                                        </asp:ChartArea>
                                    </ChartAreas>
                                </asp:Chart>

Open in new window

ScreenHunter-01-Aug.-17-15.37.jpg
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of emresamisuzer
emresamisuzer

ASKER

Why I am getting a loop in 3.5?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Somehow the code that draws the chart runs twice. Thanks for your help.