MultiLineText GetDataPointLabel(double stackLeft, double widthPerStack, double chartBottom, string label) { var element = new MultiLineText(stackLeft + widthPerStack / 2, chartBottom, label) .WithTextAnchor(TextAnchor.Middle) .WithFill(_dataPointLabelFill) .WithFontFamily(_dataPointLabelFontFamily) .WithFontSize(_dataPointLabelFontSize) .WithLineHeight(_dataPointLabelHeight); if (_dataPointAutoLineSplit) { element.WithAutoLineSplit(_dataPointLengthPerLine); } return(element); }
BaseElement GetGroupLabel(double drawableLeft, double widthPerGroup, int index, double chartBottom, double stackLabelHeight, string label) { if (string.IsNullOrEmpty(label)) { return(new NoopElement()); } var element = new MultiLineText(drawableLeft + ((widthPerGroup + _groupGutter) * index) + widthPerGroup / 2, chartBottom + stackLabelHeight + 4, label) .WithTextAnchor(TextAnchor.Middle) .WithFill(_groupLabelFill) .WithFontFamily(_groupLabelFontFamily) .WithFontSize(_groupLabelFontSize) .WithLineHeight(_groupLabelLineHeight); if (_groupLabelAutoLineSplit) { element.WithAutoLineSplit(_groupLabelLengthPerLine); } return(element); }
BaseElement GetStackLabel(double stackLeft, double widthPerStack, double chartBottom, double dataPointLabelHeight, string label) { if (string.IsNullOrEmpty(label)) { return(new NoopElement()); } var element = new MultiLineText(stackLeft + widthPerStack / 2, chartBottom + dataPointLabelHeight + 4, label) .WithTextAnchor(TextAnchor.Middle) .WithFill(_stackLabelFill) .WithFontFamily(_stackLabelFontFamily) .WithFontSize(_stackLabelFontSize) .WithLineHeight(_stackLabelLineHeight); if (_stackLabelAutoLineSplit) { element.WithAutoLineSplit(_stackLabelLengthPerLine); } return(element); }