我正在使用ApexchartJS库。
是否可以在candlestick图表的单独candle bar之间设置candle width或indentation大小?
现在我的两个条形重叠,彼此重叠。
请查看CodePen:https://codepen.io/yura_bezhentsev/pen/abOGGZo
这是我的选项配置:
const options = {
series: [{
data: [
{
x: 'First',
y: [6630, 6660, 6623, 6650]
},
{
x: 'Second',
y: [6650, 6663, 6623, 6630]
},
{
x: 'Third',
y: [6630, 6660, 6623, 6650]
}
]
}],
chart: {
type: 'candlestick',
height: 400
},
xaxis: {
type: 'category',
min: 0,
max: 4
}
};
当少量蜡烛出现时,它看起来像是ApexCharts中的错误。一个小的解决方法是设置tickPlacement
属性(不过您将失去缩放的能力)
xaxis: {
tickPlacement: 'between'
}