Jump to content
Software FX Community

"No Data Available" on 2nd call of Sub


jon_m

Recommended Posts

 I have a chart that plots well from data passed in from a  DataSet Table. The DataSet is cleared at the start of the Sub ('Display'). I have tried chart methods;   'Chart1.DataSource = Nothing   'Chart1.AxisY.ResetScale()   'Chart1.AxisX.ResetScale()   'Chart1.RecalcScale()

 And iwith another Sub ('Clear')  called before running a 2nd call to the Sub 'Display' I have tried these   Chart1.ClearData(ClearDataFlag.Titles Or ClearDataFlag.AllData)   Chart1.DataBindings.Clear()

 However, all I get on the second call is "No Data Available" without a plot.

 

Also (a different issue) when implementing this;  'Chart1.AxisY.ForceZero = False The Y-axis still plots to zero ?

 

Any help much appreciated.

Jon 

Link to comment
Share on other sites

I don't think I understand what you mean.

You are clearing the data, so you are getting "No Data Available". This is what it is supposed to do.

As for setting ForceZero, this only affects future updates of the Axis Scale. If Zero is already there nothing will happen. You need to set ForceZero before setting any data to the chart.

 

Link to comment
Share on other sites

 Francisco

Thanks for your help.

I found the problem to "No Data Available". Nothing to do with  ChartFX, sorry.... just that I had not instantiated a 'NEW' dataset on the next call of that sub. It nows works properly.

 I have, in the mean time, replaced y-axis scaling with .Min & .Max which also work properly. I take your point about ForceZero needing to be set prior data assignment. I would have had it wrong there.

Chart FX Lite is now working extremely well & fast, being able to flick through many charts quickly. Just wish it had an option for a secondary y-axis.

ThanksJon 

 

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