Totals on top of a stacked bar chart

Is it possible to put a total value ontop of a stacked bar in a stacked barchart?

Unfortunately, so far there is no total label for stacked charts, but thank you for the idea - we’ll consider this as a possible update.

What is available at the moment:

  • Individual labels are positioned in the center of each segment.
  • While configuring data series, you can set different labels for each series, so it is possible to set labels only for the top bar segment.
  • Also, for the stacked charts, the total value of a full bar is stored as obj.$sum in each data item (calculated from data, required for rendering).

With these options, you can get the following representation (line 33) without any intricate settings: Code Snippet

The main challenge is to render it in a consistent position atop of the bars.
The solution is quite tricky, but it is possible to access chart’s configuration and calculate the needed shift, then include it in the template: Code Snippet