【发布时间】:2016-03-08 15:32:09
【问题描述】:
我制作了一个条形图,它还有一个子图。我想将子图的类型更改为线。如,主图应该是条形图,而子图应该是折线图。
这是我用来生成图表的一段代码。但是子图的类型不起作用。
var chart=c3.generate({
bindto:bindTo(),
data:{
x:'x',
/* value:['Percent DEP Enabled'],*/
columns:data(),
type: 'bar'
},
subchart: {
show: true,
size: {
height: 25
},
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%m-%d-%y',
rotate: -45,
},
height: 75
},/* y: {
tick: {
values: function(){
jQuery.forEach(function(){
})}
count: 8,
format:d3.format(".2s"),
},
},*/
subchart: {
show: true,
type: 'line',
}
}
});
【问题讨论】:
标签: javascript jquery d3.js charts c3.js