Group: Forum Members
Last Active: 14 Years Ago
Posts: 12,
Visits: 1
|
I'm attempting to create a chart that's bound to an IBindingList. When the list is refreshed, the chart updates itself just fine. However, I also have an axis cursor set up for the x axis. When I first configure it, I set it up this way:
NAxisCursor xAxisCursor = new NAxisCursor(); NDateTimeValueSnapper valueSnapper = new NDateTimeValueSnapper(); valueSnapper.Step = new NDateTimeSpan(1, NDateTimeUnit.Minute); valueSnapper.Origin = [first timestamp in my original data]; xAxisCursor.ValueSnapper = valueSnapper; xAxisCursor.BeginEndAxis = (int)StandardAxis.PrimaryY; xAxisCursor.StrokeStyle.Color = Color.Red; xAxisCursor.StrokeStyle.Width = new NLength(1);
When the binding list is updated, the timestamps of the data change and the original Origin doesn't apply. How do I update the cursor in that case?
Thanks.
|
Group: Nevron Team
Last Active: 14 Years Ago
Posts: 48,
Visits: 1
|
Hi Anna, You can subscribe for the ListChanged event of the IBindingList source and update the Origin of the ValueSnapper manually. Best Regards, Milen
|