示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }