0
我想改進此C3圖表。問題在於兩點之間的間隔很大,我想壓縮或破壞這個點,同時還顯示一條線以指示x軸中斷。我可以用C3或D3來做這個嗎?C3折線圖:遠點之間的壓縮或折斷間隔
var chart = c3.generate({
data: {
x: 'x',
columns: [
['x', '2010-01-01', '2010-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06'],
['data1', 30, 200, 100, 400, 150, 250],
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%Y-%m-%d'
}
}
}
});
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.css'>
<div id="chart"></div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.11/c3.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.js'></script>
Plotly不能處理這種情況之一:https://jsfiddle.net/eohptv82/ –