updateElements(points, start, count, mode) {
const me = this;
const reset = mode === 'reset';
- const {xScale, yScale} = me._cachedMeta;
+ const {iScale, vScale} = me._cachedMeta;
const firstOpts = me.resolveDataElementOptions(start, mode);
const sharedOptions = me.getSharedOptions(firstOpts);
const includeOptions = me.includeOptions(mode, sharedOptions);
+ const iAxis = iScale.axis;
+ const vAxis = vScale.axis;
for (let i = start; i < start + count; i++) {
const point = points[i];
const parsed = !reset && me.getParsed(i);
- const x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(parsed.x);
- const y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(parsed.y);
- const properties = {
- x,
- y,
- skip: isNaN(x) || isNaN(y)
- };
+ const properties = {};
+ const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);
+ const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);
+
+ properties.skip = isNaN(iPixel) || isNaN(vPixel);
if (includeOptions) {
properties.options = me.resolveDataElementOptions(i, mode);
updateElements(points, start, count, mode) {
const me = this;
const reset = mode === 'reset';
- const {xScale, yScale, _stacked} = me._cachedMeta;
+ const {iScale, vScale, _stacked} = me._cachedMeta;
const firstOpts = me.resolveDataElementOptions(start, mode);
const sharedOptions = me.getSharedOptions(firstOpts);
const includeOptions = me.includeOptions(mode, sharedOptions);
+ const iAxis = iScale.axis;
+ const vAxis = vScale.axis;
const spanGaps = me.options.spanGaps;
const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;
const directUpdate = me.chart._animationsDisabled || reset || mode === 'none';
const point = points[i];
const parsed = me.getParsed(i);
const properties = directUpdate ? point : {};
- const nullData = isNullOrUndef(parsed.y);
- const x = properties.x = xScale.getPixelForValue(parsed.x, i);
- const y = properties.y = reset || nullData ? yScale.getBasePixel() : yScale.getPixelForValue(_stacked ? me.applyStack(yScale, parsed, _stacked) : parsed.y, i);
- properties.skip = isNaN(x) || isNaN(y) || nullData;
- properties.stop = i > 0 && (parsed.x - prevParsed.x) > maxGapLength;
+ const nullData = isNullOrUndef(parsed[vAxis]);
+ const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);
+ const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? me.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);
+
+ properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;
+ properties.stop = i > 0 && (parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;
properties.parsed = parsed;
if (includeOptions) {