var ctx = document.getElementById("myChart").getContext("2d");
var startWithDataset =1;
var startWithData =1;
options = {
animationStartWithDataset : startWithDataset,
animationStartWithData : startWithData,
animationSteps : 60,
canvasBorders : false,
canvasBordersWidth : 3,
canvasBordersColor : "black",
graphTitle : "График соотношения новых абонентов и отключенных ТВ",
legend : true,
inGraphDataShow : true,
annotateDisplay : true,
graphTitleFontSize: 18,
animationLeftToRight : true,
animationByDataset : true,
responsive : true,
maintainAspectRatio : true
};
var data={
labels: [<?php echo Diffuse($labels,28);?>],
datasets: [
{
axis : 1,
title: 'Новые',fillColor: "rgba(65,244,23,0.3)",strokeColor: "rgba(220,220,220,1)",pointColor: "rgba(65,126,164,1)",pointStrokeColor: "#fff",pointHighlightFill: "#fff",pointHighlightStroke: "rgba(220,220,220,1)",
data: [<?php echo "$ntv_dat";?>]
},
{
axis : 1,
title: 'Отключенные',fillColor: "rgba(244,23,44,0.3)",strokeColor: "rgba(244,23,44,1)",pointColor: "rgba(65,126,164,1)",pointStrokeColor: "#fff",pointHighlightFill: "#fff",pointHighlightStroke: "rgba(220,220,220,1)",
data: [<?php echo "$btv_dat";?>]
},
{
axis: 2,
title: 'По балансу',fillColor: "rgba(25,144,123,0)",strokeColor: "rgba(220,220,220,1)",pointColor: "rgba(65,126,164,1)",pointStrokeColor: "#fff",pointHighlightFill: "#fff",pointHighlightStroke: "rgba(220,220,220,1)",
data: [<?php echo "$btv_dat_1";?>]
}
]
};