ryanlcs Posted July 7, 2009 Report Share Posted July 7, 2009 Hi.. I am new to chart FX, and I need to develop an Web Chart using chart FX. I have following codes, but hits an error on line 3: System.NullReferenceException: Object reference not set to an instance of an object. I found the online sample coding (Softwarefx's Website), but it does not solve it. Is there any sample help code that I can refers to? In my project, I included the ChartFX.WebForms.dll Please advice. Line 1: Imports ChartFX.WebFormsLine 2: Dim Charts As ChartFX.WebForms.ChartLine 3: Charts.Data.Series = 2 Line 4: Charts.Data.Points = 5 Line 5: Charts.Series(0).Color = System.Drawing.Color.DarkGreen Quote Link to comment Share on other sites More sharing options...
RandyJ Posted July 27, 2009 Report Share Posted July 27, 2009 Hi, Have you dropped the chart control onto a form? Additionally, I noticed you are specifying a color for a series that does not exist yet (Line 5). This may be the line causing the problem. You need to define (add) the actual series to the chart before attempting to access it in the Series Collection (chart.series(0).... cannot be accesed if this series has not been added). Regards, RandyJ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.