I am using the class DraggingDataPointTool.cs from the samples explorer to move my datapoints. However, the datapoints value seems to change, but the chart is not redrawing the new location.
I stepped through the following method in that class and i think the problem has to do with this.UltraChart.InvalidateLayers(); I can't seem to figure it out. Is there a property on the chart I need to change to allow this?
public override void MouseMove() { base.MouseMove(); if (this.draggingPrimitive == null) return; // get the datapoint off the primitive NumericDataPoint dataPoint = this.draggingPrimitive.DataPoint as NumericDataPoint; if (dataPoint == null) return; // change the datapoint value and invalidate the chart. dataPoint.Value = (double)this.axisY.MapInverse(this.LastInput.ViewPoint.Y); this.UltraChart.InvalidateLayers(); }
figured it out. It was binded to a datatable, I had to update values in datatable with new points then refresh. Wish this was mentioned in the example.
Also, why is there 3 different methods to load data into the chart, shouldn't it all converge into one method?
The chart has different methods to load data, because the customers have different needs and also because of compatibility reasons. At the end they go to one method, but it seems that there are some differences. We'll review this stuff again. Thanks for reporting this.