dc.cw("BarChart", "chart", {
id: "barChart"
, "config": {
"type": "bar"
, "data": {
"datasets": [{
"type": "bar"
, "data": [65, 59, 80, 81, 56, 55, 40]
, "label": "Primeiro conjunto"
, "hidden": false
, "backgroundColor": ["rgba(255, 99, 132, 0.2)", "rgba(255, 159, 64, 0.2)", "rgba(255, 205, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(201, 203, 207, 0.2)"]
, "borderColor": ["rgb(255, 99, 132)", "rgb(255, 159, 64)", "rgb(255, 205, 86)", "rgb(75, 192, 192)", "rgb(54, 162, 235)", "rgb(153, 102, 255)", "rgb(201, 203, 207)"]
, "borderWidth": 1
}]
, "labels": ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho"]
}
, "options": {
"barPercentage": 0.9
, "indexAxis": "x"
, "gridLines": {
"offsetGridLines": true
}
, "scales": {
"y": {
"offset": true
, "stacked": false
, "ticks": {
"autoSkip": true
, "mirror": false
, "beginAtZero": true
}
}
}
, "animation": {
"duration": 0
}
, "plugins": {
"title": {
"display": true
, "text": "Gráfico Barras"
}
, "legend": {
"display": true
, "position": "top"
, "fullWidth": true
, "reverse": false
, "rtl": false
, "labels": {
"usePointStyle": false
, "color": "#2980B9"
, "font": {
"size": 24
, "style": "bold"
}
}
}
}
}
}
});
dc.cw("CommandButton", "widget_BtnExportar", {
id: "BtnExportar"
});
dc.cw("CommandButton", "widget_BtnImprimir", {
id: "BtnImprimir"
, behaviors: {
click: function (ext, event) {
printJS({
printable: 'barChart'
, type: 'html'
, documentTitle: 'Gráfico Barras'
});
return false;
}
}
});
dc.cw("Dialog", "widget_dlg", {
id: "dlg"
, resizable: false
, modal: true
, showEffect: "fade"
});