UNPKG

@gooddata/react-components

Version:

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

35 lines 1.65 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 }); // (C) 2007-2020 GoodData Corporation var React = require("react"); var ColorLegend_1 = require("./ColorLegend"); var HeatmapLegend = /** @class */ (function (_super) { __extends(HeatmapLegend, _super); function HeatmapLegend() { return _super !== null && _super.apply(this, arguments) || this; } HeatmapLegend.prototype.render = function () { var _a = this.props, series = _a.series, format = _a.format, numericSymbols = _a.numericSymbols, isSmall = _a.isSmall, position = _a.position; var data = series.map(function (item) { var range = item.range, color = item.color; return { range: range, color: color }; }); return (React.createElement(ColorLegend_1.ColorLegend, { data: data, format: format, isSmall: isSmall, numericSymbols: numericSymbols, position: position })); }; return HeatmapLegend; }(React.PureComponent)); exports.default = HeatmapLegend; //# sourceMappingURL=HeatmapLegend.js.map