Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MS Chart Control -Line Chart Problem

Posted on 2010-08-17
4
Medium Priority
?
1,038 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1200 total points
ID: 33454147
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
ID: 33454166
Why I am getting a loop in 3.5?
0
 
LVL 16

Assisted Solution

by:Stephan
Stephan earned 800 total points
ID: 33454183
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
ID: 33454566
Somehow the code that draws the chart runs twice. Thanks for your help.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 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