Guage labels as shown here http://bernii.github.io/gauge.js/ does not work out of the box.
Closed this issue · 3 comments
OmkarFatale commented
I added this to options
staticLabels: {
font: "10px sans-serif", // Specifies font
labels: [200, 230, 250, 220.1, 260, 300], // Print labels at these values
color: "#111", // Optional: Label text color
fractionDigits: 0 // Optional: Numerical precision. 0=round off.
},
tried changing colors but no luck its showing this only.
kplindegaard commented
staticLabels don't work for Donut, only Gauge.
shahinlotfi commented
I can't get any labels to show when using the Donut, not even the "main" label shown in the example previews.
kplindegaard commented
Use the setTextField()
method on the Dount object and provide the element you want.
For example, in your html you have a
<div id="preview-textfield"></div>
Pass a ref to that directly after initializing your gauge/donut
// Initialize gauge
gauge.setTextField(document.getElementById("preview-textfield"));