public EnabledLineSeriesSettingsVM(EnabledLineSeries series) { TotalDPSEnabled = series.HasFlag(EnabledLineSeries.TotalDPS); TotalDamageEnabled = series.HasFlag(EnabledLineSeries.TotalDamageDealt); TakenDamageEnabled = series.HasFlag(EnabledLineSeries.TotalDamageTaken); InstanceDPSEnabled = series.HasFlag(EnabledLineSeries.InstanceDPS); MPAAverageEnabled = series.HasFlag(EnabledLineSeries.AverageMPADPS); }
private void setSeriesVisibility(LineSeries series, EnabledLineSeries flag) { //Workaround for Visibility throwing NullReferenceException. //LiveCharts bug https://github.com/Live-Charts/Live-Charts/issues/693 try { series.Visibility = enabledSeries.HasFlag(flag) ? Visibility.Visible : Visibility.Hidden; } catch (NullReferenceException) { } }