dc.cw("BarChart", "widget_grafico", {
id: "grafico"
, "config": {
"type": "bar"
, "data": {
"datasets": [{
"type": "bar"
, "data": [10, 20, 30, 40]
, "label": "Conjunto de dados barra"
, "hidden": false
, "backgroundColor": "rgba(255, 99, 132, 0.2)"
, "borderColor": "rgb(255, 99, 132)"
}, {
"type": "line"
, "data": [50, 30, 25, 45]
, "label": "Conjunto de dados linha"
, "hidden": false
, "borderColor": "rgb(54, 162, 235)"
, "fill": false
, "showLine": true
, "spanGaps": false
}]
, "labels": ["Janeiro", "Fevereiro", "Março", "Abril"]
}
, "options": {
"barPercentage": 0.9
, "indexAxis": "x"
, "gridLines": {
"offsetGridLines": true
}
, "scales": {
"y": {
"offset": true
, "stacked": false
, "ticks": {
"autoSkip": true
, "mirror": false
, "beginAtZero": true
}
}
}
, "plugins": {}
}
}
});