Solved

MS Chart Control -Line Chart Problem

Posted on 2010-08-17
4
1,022 Views
Last Modified: 2013-11-27
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
0
Comment
Question by:emresamisuzer
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 300 total points
Comment Utility
I tried that code with ASP.NET 4.0 (2010), and it draws just fine with the code that you have.  That almost seems like a trend line, but there isn't any indication of one in the HTML, or the code.
Screenshot.png
0
 

Author Comment

by:emresamisuzer
Comment Utility
Why I am getting a loop in 3.5?
0
 
LVL 16

Assisted Solution

by:Stephan
Stephan earned 200 total points
Comment Utility
Tried it with asp.net 3.5 under vs 2008 and no problems found, same as TheLearnedOne

Did you do something more than what you have posted?
0
 

Author Closing Comment

by:emresamisuzer
Comment Utility
Somehow the code that draws the chart runs twice. Thanks for your help.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now