【发布时间】:2020-09-21 19:51:28
【问题描述】:
const lastTick = this.xAxis[0].ticks[this.xAxis[0].tickPositions.length - 1];
const { width } = lastTick.label.getBBox();
const { chartWidth } = this;
lastTick.label.attr({ x: chartWidth - (0.7) * width });
这是 highcharts 代码。我想要{ width }、{ chartWidth } 的含义。
【问题讨论】:
-
这是解构。
const { chartWidth } = this;只是const chartWidth = this.chartWidth;
标签: javascript