UNPKG

@gooddata/react-components

Version:

GoodData.UI - A powerful JavaScript library for building analytical applications

40 lines 1.84 kB
"use strict"; 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 (b.hasOwnProperty(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 __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var measure_1 = require("./measure"); var utils_1 = require("./utils"); var TreemapColorStrategy = /** @class */ (function (_super) { __extends(TreemapColorStrategy, _super); function TreemapColorStrategy() { return _super !== null && _super.apply(this, arguments) || this; } TreemapColorStrategy.prototype.createColorAssignment = function (colorPalette, colorMapping, viewByAttribute, stackByAttribute, executionResponse, afm) { var colorAssignment; if (viewByAttribute) { colorAssignment = utils_1.getAtributeColorAssignment(viewByAttribute, colorPalette, colorMapping, executionResponse, afm); } else { var result = _super.prototype.createColorAssignment.call(this, colorPalette, colorMapping, viewByAttribute, stackByAttribute, executionResponse, afm); colorAssignment = result.outputColorAssignment; } return { fullColorAssignment: colorAssignment, outputColorAssignment: colorAssignment, }; }; return TreemapColorStrategy; }(measure_1.default)); exports.default = TreemapColorStrategy; //# sourceMappingURL=treemap.js.map