@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
33 lines (32 loc) • 1.41 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 BaseLineChartStyleService from '../line/base';
var LineChartY2StyleService = /** @class */ (function (_super) {
__extends(LineChartY2StyleService, _super);
function LineChartY2StyleService(option) {
var _this = _super.call(this, option) || this;
// 图表类型
_this.chartType = ChartType.LineY2;
_this.useCrossAxis2 = true;
// 左侧y轴subFields复制给右侧y轴
if (_this.crossAxis1.subFields.length > 0) {
_this.crossAxis2.setFields(_this.crossAxis1.subFields);
_this.crossAxis1.setSubFields([]);
}
return _this;
}
return LineChartY2StyleService;
}(BaseLineChartStyleService));
export default LineChartY2StyleService;