|
MethodInfo info = chart.GetType().GetMethod("UpdateArea",
BindingFlags.NonPublic | BindingFlags.Instance,
null,
new Type[] { typeof(bool) },
null);
info?.Invoke(chart, new object[] { true });
|
public void RefreshPlot()
{
var info = Chart.GetType().GetMethod("UpdateArea", BindingFlags.NonPublic | BindingFlags.Instance, null,
new[] {typeof(bool)}, null);
info?.Invoke(Chart, new object[] { true });
Console.WriteLine(((ICollection)Chart.Series[0].ItemsSource).Count);
}
The Count does increase every time I call refresh plot however the chart is not updated. No extra points are added to the screen. Any other suggestions?
Thanks!
|
MethodInfo methodInfo = chart.Series[0].GetType().GetMethod("OnBindingPathChanged",
BindingFlags.NonPublic | BindingFlags.Instance);
methodInfo?.Invoke(chart.Series[0], new object[] { null });
|