I am working with stacked bar charts. How do I make the tooltip show only the category of the data, not the exact value or as an alternative is it possible to show the category not the value at the end of the bars (as if you set .showValue(true)
, but with the category).
UPDATE
I've found a solution for showing in the tooltip only the category (key), but it involves the modification of the source code and it does not look so nice. I think the proper name for what I want to do is to display the labels for each bar. I cannot make it work with this code:
chart.xAxis.
.axisLabel(attrs.xAxisLabel)
.tickFormat(d3.format('r'));
Because it gives me an error that the attrs
is not defined. I've got the idea from here. But I cannot make it work.
UPDATE
To be a bit more concrete:
I want to show on the vertical axis that round_1_2
, not just when I hover.