Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
947
Question about ScatterChart's Column X and Column Y
posted

Hi,

 I am using ScatterChart with IBindingList as DataSource, and have set ColumnX and ColumnY. And It worked.

And the new data was automatically plotted.

However, as there is no way to fix the index of fields in IBindingList to be 1 and 2 all the time, ScatterChart no longer worked.

 Is there a way to fix this issue from ScatterChart's option?

If not, if I use DataTable as a data source, would the new data added to the DataTable plotted automatically, or do I have to manually DataBind each time DataTable's content changes?

Parents
  • 28496
    Offline posted

    if you take the class of the objects inside your IBindingList and have them implement ICustomTypeDescriptor, you can determine the index order of properties in the ICustomTypeDescriptor.GetProperties method.

    i think the chart will listen to the DataTable's updating events and redraw.  if that doesn't work for some reason, then you could try using the DataTable's DefaultView property, which is a DataView, and DataView implements IBindingList.

Reply Children