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
519
BarChart - Show DATA_VALUE in the Legend
posted

I am creating a BarChart and a PieChart.
I need to show in the legend the following values: ITEM_LABEL and DATA_VALUE.

In the PieChart, I set up the "Legend > FormatString" property as "<ITEM_LABEL> (<DATA_VALUE: ###, ###, ## 0>)" and it worked correctly.
For the BarChart, the same configuration does not work ...

Hovering in each bar, the value of all items of the legend is changed to the value of the bar that was the last mouse.
What is the correct configuration to display the value of the bars in the legend?

For the tooltip, the same setup worked for the two graphs.

Parents
No Data
Reply
  • 18495
    Suggested Answer
    posted

    Hello Patricia,

    Thank you for contacting Infragistics.

    Because the UltraChart has the ability to display bars for more than one series at a time, it's not possible to display the data value in the legend.  If you have more than one series, how will the chart know which value to display in the legend?  The reason this works with the pie chart is because the pie chart can only display one series at a time.

    When I tested this using the format string you provided, I noticed that it was displaying the maximum X-axis value and it wasn't changing whenever I hovered my mouse pointer over any of the bars.  This difference in behavior is most likely because I'm using a newer version of the chart than you are.  I am using Infragistics 2014 Volume 1.

    Please let me know if you have any other questions about this.

Children