【发布时间】:2019-04-16 17:45:22
【问题描述】:
我正在尝试创建这个堆叠条形图(使用 C3.js),就像这张图片中的 on,它是时间序列的堆叠条形图。
{
data: {
json: [
{
"calendar_date": "2018-11-01",
"segment_description": "Executive Suite",
"before_otb": 2,
},
{
"calendar_date": "2018-11-01",
"segment_description": "Handicapped Room",
"before_otb": 3,
},
{
"calendar_date": "2018-11-01",
"segment_description": "Junior Suite",
"before_otb": 5,
}
],
type: 'bar',
keys: {
x: 'calendar_date',
value: ['before_otb']
},
},
axis: {
x: {
type: 'timeseries'
}
}
}
`
【问题讨论】:
标签: javascript angularjs web d3.js c3.js