private void HandleChartUpdateEvent(DocumentWindow window, object _, DataPointEvent e) { Dispatcher.InvokeAsync(() => { if (window?.IsOpen == true) { (window.Content as LineChart)?.HandleUpdateEvent(e); } }); }
internal void FireChartEvent(GenerateStatsOptions options, string action, List <PlayerStats> selected = null, Predicate <object> filter = null) { lock (TankingGroupIds) { if (options.RequestChartData) { // send update DataPointEvent de = new DataPointEvent() { Action = action, Iterator = new TankGroupCollection(TankingGroups, options.DamageType), Filter = filter }; if (selected != null) { de.Selected.AddRange(selected); } EventsUpdateDataPoint?.Invoke(TankingGroups, de); } } }
internal void HandleUpdateEvent(DataPointEvent e) { switch (e.Action) { case "CLEAR": Clear(); break; case "UPDATE": Clear(); AddDataPoints(e.Iterator, e.Selected, e.Filter); break; case "SELECT": Plot(e.Selected); break; case "FILTER": Plot(e.Filter); break; } }