UNPKG

@qn-pandora/pandora-visualization

Version:

Pandora 通用可视化库

42 lines (41 loc) 1.78 kB
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 __()); }; })(); var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import OneDChartStyleService from './one-d'; var RelationBaseStyleService = /** @class */ (function (_super) { __extends(RelationBaseStyleService, _super); function RelationBaseStyleService() { return _super !== null && _super.apply(this, arguments) || this; } RelationBaseStyleService.getChartInitStyle = function (option, initFirst) { if (initFirst === void 0) { initFirst = true; } var newOption = { currentBuckets: option.buckets.slice(0, 2), currentMetrics: option.metrics.slice(0, 1) }; return initFirst ? __assign(__assign({}, newOption), option) : __assign(__assign({}, option), newOption); }; return RelationBaseStyleService; }(OneDChartStyleService)); export default RelationBaseStyleService;