Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4133
Formatting Values In Funnel Chart
posted

I am having problems trying to format my currency data inside the slices of the funnel.  The problem is that the value is a decimal datatype in my class, but I don't see a way to pass a format string to the chart control.  If I make the datatype a string and do the formatting myself, the "weighted" visibility option doesn't work.  I don't see anything in the documentation about how to format funnel data values.  Can you help me?

Parents
No Data
Reply
  • 1500
    Offline posted

    Hello Richard,

    Formatting data inside funnel slices can be done via the exposed property FormatInnerLabel, which accepts a formatter function.

    this.ultraFunnelChart1.InnerLabelMemberPath = "Value";

    this.ultraFunnelChart1.FormatInnerLabel = (object value, int index, object funnelChart) =>
                {
                    return string.Format("{0:c}", value);
                };

    The function accepts 3 arguments, the value you would like to format, the index within the data, and the final argument is a reference to the funnel chart, while returning single string which will be set as label.

    Should you have any further questions, please let me know.

    Sincerely,
    Tihomir Tonev
    Associate Software Developer

Children