Hello everyone
Expected behavior
I would like to be able to format values in € in API-based single value charts.
I would like to be able to format tooltips and legends in other API-based charts like in the screenshot bellow. (tooltips in € and numbers with spaces in legends) (If I’m not mistaken, legends numbers have spaces at the base in chart.js)
I’m using chart.js on a project and I wanted to know if it’s possible to use the
options
object to format tooltips :
new Chart(chart, {
type,
data,
options: {
plugins: {
tooltip: {
callbacks: {
label: ({ raw: value }) => {
return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(value)
}
}
}
}
}
}
Actual behavior single value charts
Simple charts can format numbers under the hood if it’s a price display like in the screenshot. But it seems that I can’t do the same thing with API-based chart. (I need more options than simple charts gives me)
Actual behavior other charts
It seems that other API-based charts, like time based charts in the screenshot, doesn’t allow to change tooltips and legends on the left.
Context
- Package Version: 7.0.0
- Express Version: 4.17.1
- Sequelize Version: 5.15.1
Thanks in advance
Also, the format of objective API-based chart isn’t the same between the value and the objective
Is this possible to change format for the value ?