Reputation: 633
I have a question, anyone have an idea, how to change Chart.js label value format?
How to change it, so it would show not "ACW (sec): 10" but "ACW: 10sec"
Code looks like:
var doughnutDataAcw = [
{
value: <?php echo gmdate("s", $singleacw); ?>,
color: "#35df6b",
highlight: "#06cc45",
label: "ACW (sec)"
}
Upvotes: 0
Views: 548
Reputation: 413702
You can use the tooltipTemplate
option:
tooltipTemplate: "ACW: <%=value%>sec"
If you need the ACW
part to come from the label:
tooltipTemplate: "<%=label%>: <%=value%>sec"
Upvotes: 1