@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
52 lines • 2.87 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 (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) 2019 GoodData Corporation
var React = require("react");
var react_dom_1 = require("react-dom");
var visualizationTypes_1 = require("../../../../constants/visualizationTypes");
var cloneDeep = require("lodash/cloneDeep");
var PluggableColumnBarCharts_1 = require("../PluggableColumnBarCharts");
var uiConfig_1 = require("../../../constants/uiConfig");
var supportedProperties_1 = require("../../../constants/supportedProperties");
var BarChartConfigurationPanel_1 = require("../../configurationPanels/BarChartConfigurationPanel");
var axis_1 = require("../../../constants/axis");
var PluggableBarChart = /** @class */ (function (_super) {
__extends(PluggableBarChart, _super);
function PluggableBarChart(props) {
var _this = _super.call(this, props) || this;
_this.secondaryAxis = axis_1.AXIS_NAME.SECONDARY_X;
_this.type = visualizationTypes_1.VisualizationTypes.BAR;
_this.defaultControlsProperties = {
stackMeasures: false,
};
_this.initializeProperties(props.visualizationProperties);
return _this;
}
PluggableBarChart.prototype.getUiConfig = function () {
return cloneDeep(uiConfig_1.COLUMN_BAR_CHART_UICONFIG);
};
PluggableBarChart.prototype.getSupportedPropertiesList = function () {
return supportedProperties_1.BAR_CHART_SUPPORTED_PROPERTIES[this.axis || axis_1.AXIS.DUAL] || [];
};
PluggableBarChart.prototype.renderConfigurationPanel = function () {
if (document.querySelector(this.configPanelElement)) {
react_dom_1.render(React.createElement(BarChartConfigurationPanel_1.default, { locale: this.locale, colors: this.colors, references: this.references, properties: this.visualizationProperties, propertiesMeta: this.propertiesMeta, mdObject: this.mdObject, pushData: this.handlePushData, type: this.type, isError: this.isError, isLoading: this.isLoading, featureFlags: this.featureFlags, axis: this.axis }), document.querySelector(this.configPanelElement));
}
};
return PluggableBarChart;
}(PluggableColumnBarCharts_1.PluggableColumnBarCharts));
exports.PluggableBarChart = PluggableBarChart;
//# sourceMappingURL=PluggableBarChart.js.map