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
3555
Movebale Datapoint...
posted

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();
        }