Code: Select all
const point = this;
Code: Select all
data: onClick(point),
Rafał
Code: Select all
const point = this;
Code: Select all
data: onClick(point),
Code: Select all
const pointDistanceX = 40;
chart: {
type: 'scatter',
zoomType: 'xy',
events: {
load() {
var chart = this,
chartWidth = chart.plotWidth,
xMax = chartWidth / pointDistanceX;
chart.update({
xAxis: {
max: xMax
}
})
}
}
},
Code: Select all
chart.update({
xAxis: {
max: xMax,
tickPositioner: function() {
var chart = this.chart,
tickPositions = [],
counter = 0;
chart.series[0].data.forEach((point) => {
if (point.x === counter) {
tickPositions.push(point.x);
counter++;
}
})
this.update({
tickPositions: tickPositions
})
}
}
})