VTable集成VChart图表场景下,边缘处的圆点被截断怎么处理?

49 阅读1分钟

问题描述

VTable集成VChart图表场景下,绘制图表上点时怎么规避边缘位置的点被截断的情况。

解决方案

axes轴上配置innerOffset,如上加上之后图表上元素与表格边缘就有一定的间距了。

代码示例

const option = {
  axes: [
          {
            orient: 'left',
            type: 'linear',
            innerOffset: {
              top: 4,
              bottom: 4,
            }
          },
          {
            orient: 'bottom',
            type: 'band',
            innerOffset: {
              left: 4,
              right: 4,
            }
          }
        ]
  ...
}

const tableInstance = new VTable.ListTable(container, option);

结果展示

在线效果参考:visactor.io/vtable/demo…

相关文档

相关api:visactor.io/vtable/opti…

github:github.com/VisActor/VT…