react-chartjs

How to show data values or index labels in ChartJs (Latest Version)

て烟熏妆下的殇ゞ 提交于 2019-11-29 02:45:30
How to show data values or index labels in ChartJs (Latest Version) as in the below image: I am using the ChartJs to display charts in my React Project. Everything is working fine, except this. I found an answer in stackoverflow ( https://stackoverflow.com/a/31632707 ), But it uses an old version of chartjs and is not working on the one which I am using. My ChartJs Code: var ctx = document.getElementById("myChart"); var BarChart = new Chart(ctx, { type: 'bar', data: { labels: ["Jan","Feb","March"], datasets: [{ label: "Chart Data", data: [10,20,15], backgroundColor: "red", borderColor: "green"