PrimeVue-Chart options can not take effect

UI Components for Vue
Post Reply
young32
Posts: 1
Joined: 24 Mar 2023, 14:07

24 Mar 2023, 14:21

I want to draw some line-chart using the Chart component of PrimeVue.
I search the document https://primevue.org/chart/#api.chart.props.options , but there isn't any detailes.
I know that the Chart uses chart.js .
So I search the document of chart.js 4.x https://www.chartjs.org/docs/latest/axes/labelling.html .
However, the option in th chart.js doc always not work.
Here are some snippet:

const lineOptions = {
scales: {
x: [{
ticks: {
beginAtZero: true, //NOT WORK
callback: function (value) { //NOT WORK
return value + 's';
}
},
title: {
display: true, //NOT WORK
text: 'time' //NOT WORK
}
}]
},
plugins: { //i it seems that all options in 'plugins' can not work
legend: { //NOT WORK
display: false
}
}
};

Could you tell me why some option can not work and how can I fix it ? Thank you!

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests