StackedBar Total Amount

Hi,

By referring this snippet: https://snippet.webix.com/t9sz9uuu

If I want to show the total amount: sales + sales2 + sales3 in either tooltips of x-Axis (by hovering the x-Axis label) or show it on the top of the bar, would it be possible?

e.g. The first chart: '02, I want to know it is 110

Hey @laicp, instead of attaching tooltip to each individual series, you could attach a general tooltip showing off the $sum property (which gets calculated from the sum of the provided values): https://snippet.webix.com/xs24cpur.

Of course, you could also display the same tooltip for each series, but this is more concise and less cumbersome to do this way.

Hi @Dzmitry

Thanks for reply. This is not a perfect solution to me as I would like to keep the tooltip of each series as well. Sorry as I didnt mentioned this clearly in previous post.

Without the tooltip of each series, it would be hard for user to derive the figure by looking on the chart. That why I am looking to show the tooltip by hovering the x-Axis or showing the total label on top of the bar.

You could try and display both of the values in the same tooltip: https://snippet.webix.com/qhw74nt8.

Unfortunately, it seems that for the stackedBar chart type the label property will display the values inside the bars (https://snippet.webix.com/qnlp61j8), not on top of them as it is the case with the normal bar chart: https://snippet.webix.com/gz36ai4k. So I’m not really sure if it is possible to do this with a stackedBar chart. As for the xAxis tooltip, I’m not sure this is possible either.

As an alternative, I suggest you look towards 3-rd party chart libraries, it is possible to integrate some of them into Webix without any issues. As a suggestion, Highcharts.js looks like it would have the functionality you need. Please note, that you would need to get the relevant library from our GitHub.

Hi @Dzmitry ,

Thanks for the reply. The first solution would be the best alternative solution at the moment. :slight_smile: