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?
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 TonevAssociate Software Developer
I'm working in VB.Net. Can you provide an example in this language or point me to some documentation on your site using VB.Net?
Hello,
The equivalent in VB would look like this:
Dim test As Func(Of Object, Integer, Object, String) = Function(ByVal value As Object, ByVal index As Integer, ByVal funnelChart As Object) String.Format("{0:c}", value) ultraFunnelChart1.FormatInnerLabel = test
Attached is a sample for further reference.
VBInnerLabels.zip
I am happy to see that you found my suggestion helpful.
Thank you for using Infragistics controls.
Works perfectly. Thanks!