Add information on y Chart Js

0๐Ÿ‘

โœ…

Use the option

scaleLabel: "<%=value%> (s)",

if you want to change the display on the scale.

Or, if you want to change the display in the tooltip, set tooltipTemplate or multiTooltipTemplate depending on whether you have a single or multiple series.

tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %> (s)",

or

multiTooltipTemplate: "<%= value %> (s)",

๐Ÿ‘:0

You have to set the scaleLabel option like this :

scaleLabel : "<%=value%>(s)"

For example, you can set it in the global Chart options :

Chart.defaults.global = {
    scaleLabel : "<%=value%>(s)"
};

๐Ÿ‘:0

You need to use the scaleLabel property.

Look at this:
Chart.js โ€“ Formatting Y axis

try :

scaleLabel: function (valuePayload) {
    return valuePayload.value + '$';
}

Leave a comment