dc.cw("LineChart", "widget_grafico", {
id: "grafico"
, "config": {
"type": "line"
, "data": {
"datasets": [{
"type": "line"
, "data": [65, 59, 80, 81, 56, 55, 40]
, "label": "Meu primeiro conjunto de dados"
, "hidden": false
, "borderColor": "rgb(75, 192, 192)"
, "fill": false
, "tension": 0.1
, "showLine": true
, "spanGaps": false
}]
, "labels": ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho"]
}
, "options": {
"showLines": true
, "spanGaps": false
, "plugins": {
"title": {
"display": true
, "text": "Gráfico Linhas"
}
}
}
}
});
dc.cw("LineChart", "widget_grafico2", {
id: "grafico2"
, "config": {
"type": "line"
, "data": {
"datasets": [{
"type": "line"
, "data": [20, 50, 100, 75, 25, 0]
, "label": "Conjunto de dados esquerdo"
, "hidden": false
, "yAxisID": "left\-y\-axis"
, "fill": true
, "tension": 0.5
, "showLine": true
, "spanGaps": false
}, {
"type": "line"
, "data": [0.1, 0.5, 1.0, 2.0, 1.5, 0]
, "label": "Conjunto de dados direito"
, "hidden": false
, "yAxisID": "right\-y\-axis"
, "fill": true
, "tension": 0.5
, "showLine": true
, "spanGaps": false
}]
, "labels": ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun"]
}
, "options": {
"showLines": true
, "spanGaps": false
, "scales": {
"left-y-axis": {
"offset": false
, "position": "left"
, "id": "left\-y\-axis"
, "stacked": false
}
, "right-y-axis": {
"offset": false
, "position": "right"
, "id": "right\-y\-axis"
, "stacked": false
}
}
, "plugins": {
"title": {
"display": true
, "text": "Gráfico Linear Cartesiano"
}
}
}
}
});