烛台的宽度/压条不可控制ApexChart

时间:2020-03-16 16:50:40

标签: width candlestick-chart apexcharts

我正在使用 ApexchartJS 库。

是否可以为烛台图表在单独的蜡烛棒之间设置蜡烛宽度压痕大小?

现在我有两个重叠的条形图。

请查看 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
  }
};

1 个答案:

答案 0 :(得分:0)

当少量蜡烛出现时,它看起来像ApexCharts中的错误。 一个小的解决方法是设置tickPlacement属性(不过您会失去缩放功能)

xaxis: {
  tickPlacement: 'between'
}