1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
import {attrFunc} from '../../modules/util';
const _attrs = {
fitLine: false
}
const fitLineMixin = Base => {
/**
* adds FitLine features
* @mixin FitLineMixin
*/
let FitLineMixin = class extends Base {
constructor() {
super();
this.setAttrs(_attrs);
}
}
/**
* If is true, renders a mean line of serieses or points. If is not specified, returns the current fitLine setting.
* @memberOf FitLineMixin
* @function
* @example
* fitLineMixin.fitLine(true)
* @param {boolean} [fitLine=false]
* @return {fitLine|FitLineMixin}
*/
FitLineMixin.prototype.fitLine = attrFunc('fitLine');
return FitLineMixin;
}
export default fitLineMixin;