删除黑色 SVG 填充 C3.js 时间序列图表
Remove black SVG fill in C3.js time-series chart
我正在尝试使用 C3.js 在 this example, but generated chart creates black svg
fill which isn't exactly what I want. How can I set fill
property to none
? See code at stackblitz.com
之后创建一个时间序列图表。
import * as c3 from 'c3';
const appDiv = document.getElementById('#app');
c3.generate({
bindto: appDiv,
data: {
x: 'x',
columns: [
['x', '2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06'],
['data', 130, 340, 200, 500, 250, 350]
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%Y-%m-%d'
}
}
}
});
<div id="app"></div>
npm link you are using as a dependency in your stackblitz code sample is omitting the c3 css style. If you reference the c3 github link, there is a sample fiddle 在试用时给出了 fork,它引用了 c3.js 和 c3.css(将 fill
设置为 none)
这是一个 forked fiddle 你的代码,显示了一个未填充的时间序列
希望对您有所帮助。
我正在尝试使用 C3.js 在 this example, but generated chart creates black svg
fill which isn't exactly what I want. How can I set fill
property to none
? See code at stackblitz.com
之后创建一个时间序列图表。
import * as c3 from 'c3';
const appDiv = document.getElementById('#app');
c3.generate({
bindto: appDiv,
data: {
x: 'x',
columns: [
['x', '2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06'],
['data', 130, 340, 200, 500, 250, 350]
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%Y-%m-%d'
}
}
}
});
<div id="app"></div>
npm link you are using as a dependency in your stackblitz code sample is omitting the c3 css style. If you reference the c3 github link, there is a sample fiddle 在试用时给出了 fork,它引用了 c3.js 和 c3.css(将 fill
设置为 none)
这是一个 forked fiddle 你的代码,显示了一个未填充的时间序列
希望对您有所帮助。