How to add icons next to datalabels?

70 Views Asked by At

React ChartJS: I'm creating a combined chart that has bars and a line. I want to display an arrow next to the line datalabels: if the value of the datalabel is bigger than the previous value then the arrow must point up, if it's lower must point down. I have this arrow as an SVG file available.

Me goal is to get something like this screenshot: arrow next to datalabel

1

There are 1 best solutions below

0
On

As Datalabels plugin does not support images, in order to do this you have to code a custom plugin that will render something relative to the datalabel position.

Here's an example in CodeSandbox