$render=explode(" ",$_POST['partial_render']);
if($_POST['dataSetIndex']=='0'){
$ps='Primeiro';
}
if($_POST['dataSetIndex']=='1'){
$ps='Segundo';
}
if($_POST['itemIndex']=='0'){
$m='Janeiro';
}
if($_POST['itemIndex']=='1'){
$m='Fevereiro';
}
if($_POST['itemIndex']=='2'){
$m='Março';
}
if($_POST['itemIndex']=='3'){
$m='Abril';
}
if($_POST['itemIndex']=='4'){
$m='Maio';
}
if($_POST['itemIndex']=='5'){
$m='Junho';
}
if($_POST['itemIndex']=='6'){
$m='Julho';
}
$resposta='
<span id="alerta" class="ui-growl-pl" data-widget="widget_alerta" data-summary="data-summary" data-detail="data-detail" data-severity="all,error" data-redisplay="true"></span>
<script id="alerta_s" type="text/javascript">
DinarteCoelho.cw("Growl", "widget_alerta", {
id: "alerta"
, sticky: false
, life: 6000
, escape: true
, keepAlive: false
, msgs: [{
summary: "Item selecionado"
, detail: "Mês: '.$m.', Conjunto: '.$ps.'"
, severity: "info"
,severityText:"Information"
}]});
</script>
';
dc.cw("Growl", "widget_alerta", {
id: "alerta"
, sticky: false
, life: 6000
, escape: true
, keepAlive: false
, msgs: []
});
dc.cw("BarChart", "widget_grafico", {
id: "grafico"
, "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)"
, "borderColor": "rgb(255, 99, 132)"
, "borderWidth": 1
}, {
"type": "bar"
, "data": [85, 69, 20, 51, 76, 75, 10]
, "label": "Segundo conjunto"
, "hidden": false
, "backgroundColor": "rgba(255, 159, 64, 0.2)"
, "borderColor": "rgb(255, 159, 64)"
, "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
}
}
}
, "plugins": {
"title": {
"display": true
, "text": "Gráfico Barras"
}
}
}
}
, behaviors: {
itemSelect: function (ext, event) {
dc.ab({
s: "grafico"
, e: "itemSelect"
, f: "formulario"
, p: "grafico"
, u: "alerta"
}, ext);
}
}
});