I have created a Radar Chart using ChartJS as follows:
HTML:
<canvas id="radarChartTest" width="800" height="600"></canvas>
<script>
radarChartTest(["A", "B", "C", "D"], [5, 10, 15, 20], document.getElementById("radarChartTest"));
</script>
JS:
function radarChartTest(categories, totals, chartToPopulate) {
var chartDisplay = chartToPopulate;
var newChart = new Chart(chartDisplay, {
type: 'radar',
data: {
labels: categories,
datasets: [
{
data: totals,
label: "test"
}
]
}
})
}
JSFiddle
The chart draws and populates fine. However, when I hover over a radar point, it does not display the value:
There should be a number after test:
.
I am expecting something similar to this:
Am I missing an attribute or something? I have checked the documentation but could not spot anything for it. I have also compared my code to where I found (a working example), but could not spot anything there either.
This is due to a bug in the that version (2.8.0) of Chart.js (Values on Tooltip of Radar Chart is not shown).
You can fix it by upgrading to 2.9.0.
Updated working Fiddle with version 2.9.0
<script src="https://cdn.jsdelivr.net/npm/[email protected]"> </script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With