Files
Chart.js/src/core/core.element.js
Jukka Kurkela b83f64b16e Rewrite animation logic (#6845)
* Rewrite animation logic

* Review update 1

* Review update 2

* Review update 3

* Add 'none' to api.md
2019-12-27 17:13:24 -05:00

28 lines
506 B
JavaScript

'use strict';
import {extend, inherits} from '../helpers/helpers.core';
import {isNumber} from '../helpers/helpers.math';
class Element {
constructor(configuration) {
extend(this, configuration);
// this.hidden = false; we assume Element has an attribute called hidden, but do not initialize to save memory
}
tooltipPosition() {
return {
x: this.x,
y: this.y
};
}
hasValue() {
return isNumber(this.x) && isNumber(this.y);
}
}
Element.extend = inherits;
export default Element;