20 InitializeComponent();
23 public override string Icon =>
"\uE9F9";
27 OnPropertyChanged(nameof(BirthYearsPerResultPlaceSeries));
28 OnPropertyChanged(nameof(XAxes));
29 OnPropertyChanged(nameof(YAxes));
35 static float regressionLineStrokeThickness = 4;
36 static float[] regressionLineStrokeDashArray =
new float[] { 3 * regressionLineStrokeThickness, 2 * regressionLineStrokeThickness };
37 static DashEffect regressionLineStrokeEffect =
new DashEffect(regressionLineStrokeDashArray);
39 public ISeries[] BirthYearsPerResultPlaceSeries => _analyticsModule ==
null ? null :
new ISeries[]
43 Values = BirthYearsPerResultPlace,
44 Mapping = (model, index) =>
46 return new Coordinate(model.ResultPlace, model.BirthYear);
48 YToolTipLabelFormatter = point => $
"{point.Model.ResultPlace}: {point.Model.BirthYear}{Environment.NewLine}{point.Model.PersonObj.FirstName}, {point.Model.PersonObj.Name}",
54 new LineSeries<PointF>
57 Mapping = (model, index) =>
59 return new Coordinate(model.X, model.Y);
61 YToolTipLabelFormatter = point => point.Model.Y.ToString(
"F2"),
64 StrokeCap = SkiaSharp.SKStrokeCap.Round,
65 StrokeThickness = regressionLineStrokeThickness,
66 PathEffect = regressionLineStrokeEffect
73 public Axis[] XAxes =>
78 Name = Properties.Resources.ResultPlaceString,
80 NameTextSize = ANALYTICS_WIDGET_AXIS_TEXTSIZE_DEFAULT,
82 TextSize = ANALYTICS_WIDGET_AXIS_TEXTSIZE_DEFAULT,
88 public Axis[] YAxes =>
93 Name = Properties.Resources.BirthYearString,
95 NameTextSize = ANALYTICS_WIDGET_AXIS_TEXTSIZE_DEFAULT,
96 SeparatorsPaint = COLORPAINT_SEPARATORS,
98 TextSize = ANALYTICS_WIDGET_AXIS_TEXTSIZE_DEFAULT,