You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create a DataSeries from a DataTable and attach a DataListener to it, you will receive DataChangeEvents with indexes matching the DataTable, but not the DataSeries.
In my special case i have a DataTable with 6 columns and create a 2 column DataSeries dynamicallly based on user interaction, depending on which graph i want to display. I attach a DataListener for custom yAxis scaling. However the dataAdded/dataChanged/dataRemoved notifications i get contain columns 0 through 5.
As i understand it, DataSeries allows me to have a limited view on the DataTable, but here it is leaking information from the part you dont want to see. Also, you dont necessarily have the means to interpret the DataTable's column numbers at this point, since cols is a private List of int within the DataSeries.
The solution would be to change the dataAdded/dataUpdated/dataRemoved methods in the following way:
check all events if their column is in the list
if yes, clone the event and map its column to its index in the column list
finally notify your listeners with the column-mapped events
The text was updated successfully, but these errors were encountered:
If you create a DataSeries from a DataTable and attach a DataListener to it, you will receive DataChangeEvents with indexes matching the DataTable, but not the DataSeries.
In my special case i have a DataTable with 6 columns and create a 2 column DataSeries dynamicallly based on user interaction, depending on which graph i want to display. I attach a DataListener for custom yAxis scaling. However the dataAdded/dataChanged/dataRemoved notifications i get contain columns 0 through 5.
As i understand it, DataSeries allows me to have a limited view on the DataTable, but here it is leaking information from the part you dont want to see. Also, you dont necessarily have the means to interpret the DataTable's column numbers at this point, since cols is a private List of int within the DataSeries.
The solution would be to change the dataAdded/dataUpdated/dataRemoved methods in the following way:
The text was updated successfully, but these errors were encountered: