2019年07月19日
SE
function top_linebar(){
var [a,b,c,d,e,f,g]=AAA[1][0]
var ctx1 = document.getElementById('myChart').getContext('2d');
var myChart1 = new Chart(ctx1,{
type: 'bar',
data: {
labels:arraySE(AAA[1][0],2,100),
datasets: [{
type: 'line',
label: 'C',
data: arraySE(AAA[1][5],2,100),
backgroundColor: "rgba(0,0,0,0.0)",
borderColor: '#bf504e',
borderWidth: 2,
pointBackgroundColor: '#bf504e',
yAxisID: 'right',
}, {
type: 'line',
label: 'C',
data: arraySE(AAA[1][7],2,100),
backgroundColor: "rgba(0,0,0,0.0)",
borderColor: '#f98461',
borderWidth: 2,
pointRadius:0,
yAxisID: 'right'
},{
type: 'bar',
label: 'B',
data: arraySE(AAA[1][4],2,100),
backgroundColor:'#51cda0',
yAxisID: 'left'
}, {
type: 'bar',
label: 'A',
data: arraySE(AAA[1][2],2,100),
backgroundColor:'#4f81bc',
yAxisID: 'left'
}, ]
},
options: {
responsive: false,
//maintainAspectRatio: false,
title: {
display: true,
text: 'ABC ',
fontSize: 8
},
legend: {
position: 'left'
},
animation: {
duration: 1000,
// easing: 'easeInElastic'
easing: 'easeOutBounce',
//onComplete :function() {alert(9)}
},
scales: {
xAxes: [{
stacked: true ,
gridLines: {
display: false
},
}],
yAxes: [{
id: 'left',
position: "left",
ticks: {stepSize: 50,min:0, max:300,},
stacked: true
},
{
id: 'right',
position: "right",
ticks: {stepSize: 80,min: 0,max:100},
}
]
},
tooltips:{
mode: 'index',
//mode: 'x',
intersect: false,
backgroundColor:'#393f635c', //#e5d8b0ba',
caretPadding:6,
yPadding:10,
xPadding:10,
titleFontSize:16,
titleFontColor:'black',
bodyFontColor:'#34495e',
bodyFontSize:14,
}
}
});
};
//function arraySE(Ary,St,En){
// var SE=[]
// for(var i=St;i< Ary.length && i<=En;i++){
// SE.push(Ary[i])
// }
// return SE
//}
【このカテゴリーの最新記事】
-
no image
-
no image
-
no image
-
no image
-
no image
posted by vbahtmlmemo at 01:21| (カテゴリなし)