I am using this chart from C3.js Gauge https://c3js.org/samples/chart_gauge.html
I want to show 6 gauge chart in same page, so i am tried copy and change var chart1, chart2, chart3, chart4, chart5, chart6.. But its showing only chart
example here
var chart = c3.generate({
data: {
columns: [
['data', 91.4]
],
type: 'gauge',
onclick: function (d, i) { console.log("onclick", d, i); },
onmouseover: function (d, i) { console.log("onmouseover", d, i); },
onmouseout: function (d, i) { console.log("onmouseout", d, i); }
},
gauge: {
// label: {
// format: function(value, ratio) {
// return value;
// },
// show: false // to turn off the min/max labels.
// },
// min: 0, // 0 is default, //can handle negative min e.g. vacuum / voltage / current flow / rate of change
// max: 100, // 100 is default
// units: ' %',
// width: 39 // for adjusting arc thickness
},
color: {
pattern: ['#FF0000', '#F97600', '#F6C600', '#60B044'], // the three color levels for the percentage values.
threshold: {
// unit: 'value', // percentage is default
// max: 200, // 100 is default
values: [30, 60, 90, 100]
}
},
size: {
height: 180
}
});
using the code
anyone can help on this?
New contributor
Vinoth SN is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.