Jump to content
Software FX Community

How to refresh chart?


Recommended Posts

I use Chartfx in an application that shows data from a database. Values are logged into database every few seconds by other software. The chart should be refreshed time after time by pressing a button. How should I do this? When I press the button:

- I reset the chart with chart1.reset

- I create a new Dataset out of the database and bind it to the Chart with: Chart1.DataSource = ds.Tables(0) .

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


But chart1.reset isn't the right usage for this, isn't it? Because all chart settings will be lost.


If I use only chart1.refresh I get the VisualStudio-Error message:

ArgumentOutOfRangeException was unhandled: Specified argument was out of the range of valid values Parameter name: series.


What is wrong? Can you explain to me?


Link to comment
Share on other sites


If I press my refresh button then there will be the following items:

Call readDataFromDatabase


If Not bDBErr Then Chart1.DataSource = ds.Tables(0)

But if I do it like this there will be an Error: ArgumentOutOfRangeException with the following description

Specified argument was out of the range of valid values.Parameter name: series

So what is wrong?

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.

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