Jump to content
Software FX Community

Chart FX imports


ryanlcs

Recommended Posts

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.WebForms

Line 2: Dim

Charts As ChartFX.WebForms.Chart

Line 3: Charts.Data.Series = 2

Line 4: Charts.Data.Points = 5

Line 5: Charts.Series(0).Color = System.Drawing.Color.DarkGreen

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...