/* istanbul ignore next */
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
define(["require", "exports", "../../common/utils/helper", "./column-base"], function (require, exports, helper_1, column_base_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StackingColumnSeries = (function (_super) {
__extends(StackingColumnSeries, _super);
function StackingColumnSeries() {
return _super !== null && _super.apply(this, arguments) || this;
}
StackingColumnSeries.prototype.render = function (series) {
series.isRectSeries = true;
var origin = Math.max(series.yAxis.visibleRange.min, 0);
var sideBySideInfo = this.getSideBySideInfo(series);
var rect;
var argsData;
var stackedValue = series.stackedValues;
for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
var point = _a[_i];
point.symbolLocations = [];
point.regions = [];
if (point.visible && helper_1.withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
rect = this.getRectangle(point.xValue + sideBySideInfo.start, stackedValue.endValues[point.index], point.xValue + sideBySideInfo.end, stackedValue.startValues[point.index], series);
argsData = this.triggerEvent(series, point, series.interior, { width: series.border.width, color: series.border.color });
if (!argsData.cancel) {
this.drawRectangle(series, point, rect, argsData);
this.updateSymbolLocation(point, rect, series);
}
}
}
};
StackingColumnSeries.prototype.doAnimation = function (series) {
this.animate(series);
};
StackingColumnSeries.prototype.destroy = function (chart) {
};
StackingColumnSeries.prototype.getModuleName = function () {
return 'StackingColumnSeries';
};
return StackingColumnSeries;
}(column_base_1.ColumnBase));
exports.StackingColumnSeries = StackingColumnSeries;
});
|