private void CreateModel() {
Model = new PlotModel {
TextColor = OxyColor.FromUInt32(0xffffffff),
PlotAreaBorderColor = OxyColors.Transparent,
LegendTextColor = OxyColor.FromUInt32(0x88ffffff),
LegendPosition = LegendPosition.RightBottom,
Axes = {
new LinearAxis {
Key = KeyRpm,
Title = ToolsStrings.Units_RPM,
TextColor = OxyColors.White,
TitleColor = OxyColors.White,
TicklineColor = OxyColors.White,
AxislineColor = OxyColors.White,
Position = AxisPosition.Bottom
},
new LinearAxis {
Key = KeyBhp,
Title = ToolsStrings.Units_BHP,
TextColor = PowerColor,
TitleColor = PowerColor,
TicklineColor = PowerColor,
AxislineColor = PowerColor,
Position = AxisPosition.Right
},
new LinearAxis {
Key = KeyNm,
Title = ToolsStrings.Units_Nm,
TextColor = TorqueColor,
TitleColor = TorqueColor,
TicklineColor = TorqueColor,
AxislineColor = TorqueColor,
Position = AxisPosition.Left
}
},
Series = {
new CatmulLineSeries {
Color = PowerColor,
Title = ToolsStrings.Common_Power,
XAxisKey = KeyRpm,
YAxisKey = KeyBhp,
TrackerKey = KeyBhp,
TrackerFormatString = $"[b]{{4:F0}}[/b] {ToolsStrings.Units_BHP} at [b]{{2:F0}}[/b] {ToolsStrings.Units_RPM}"
},
new CatmulLineSeries {
Color = TorqueColor,
Title = ToolsStrings.Common_Torque,
XAxisKey = KeyRpm,
YAxisKey = KeyNm,
TrackerKey = KeyNm,
TrackerFormatString = $"[b]{{4:F0}}[/b] {ToolsStrings.Units_Nm} at [b]{{2:F0}}[/b] {ToolsStrings.Units_RPM}"
}
}
};
WeakEventManager<INotifyPropertyChanged, PropertyChangedEventArgs>.AddHandler(SettingsHolder.Content, nameof(INotifyPropertyChanged.PropertyChanged),
ContentSettings_Changed);
}