@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
16 lines • 946 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
// (C) 2020 GoodData Corporation
var omit = require("lodash/omit");
var executionResultHelper_1 = require("../geoChart/executionResultHelper");
var geoChart_1 = require("../../components/visualizations/chart/colorStrategies/geoChart");
function getColorStrategy(colorPalette, colorMapping, geoData, execution, afm) {
var executionResponse = execution.executionResponse;
var _a = executionResultHelper_1.findGeoAttributesInDimension(execution, geoData), locationAttribute = _a.locationAttribute, segmentByAttribute = _a.segmentByAttribute;
var locationAttributeHeader = {
attributeHeader: omit(locationAttribute, "items"),
};
return new geoChart_1.default(colorPalette, colorMapping, locationAttributeHeader, segmentByAttribute, executionResponse, afm);
}
exports.getColorStrategy = getColorStrategy;
//# sourceMappingURL=colorStrategy.js.map