@amcharts/amcharts5
Version:
amCharts 5
23 lines • 946 B
JavaScript
import { LineSeries } from "./LineSeries";
import { curveMonotoneXTension } from "../../../core/render/MonotoneXTension";
/**
* Smoothed line series suitable for horizontal plots.
*
* @see {@link https://www.amcharts.com/docs/v5/charts/xy-chart/series/smoothed-series/} for more info
*/
export class SmoothedXLineSeries extends LineSeries {
_afterNew() {
this._setDefault("curveFactory", curveMonotoneXTension(this.get("tension", 0.5)));
super._afterNew();
}
_updateChildren() {
if (this.isDirty("tension")) {
this.set("curveFactory", curveMonotoneXTension(this.get("tension", 0.5)));
this._valuesDirty = true;
}
super._updateChildren();
}
}
SmoothedXLineSeries.className = "SmoothedXLineSeries";
SmoothedXLineSeries.classNames = LineSeries.classNames.concat([SmoothedXLineSeries.className]);
//# sourceMappingURL=SmoothedXLineSeries.js.map