@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
32 lines (31 loc) • 1.38 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { ChartType } from '../../../../../constants/chart-style';
import BaseBarChartStyleService from '../bar/base';
var LineBarChartStyleService = /** @class */ (function (_super) {
__extends(LineBarChartStyleService, _super);
function LineBarChartStyleService(option) {
var _this = _super.call(this, option) || this;
// 图表类型
_this.chartType = ChartType.LineBar;
// 右侧y轴复制给左侧y轴
if (_this.crossAxis2 && _this.crossAxis2.fields.length > 0) {
_this.crossAxis1.setSubFields(_this.crossAxis2.fields);
_this.crossAxis2.setFields([]);
}
return _this;
}
return LineBarChartStyleService;
}(BaseBarChartStyleService));
export default LineBarChartStyleService;