@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
49 lines • 3.37 kB
JavaScript
"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) 2019 GoodData Corporation
var React = require("react");
var react_intl_1 = require("react-intl");
var Bubble_1 = require("@gooddata/goodstrap/lib/Bubble/Bubble");
var BubbleHoverTrigger_1 = require("@gooddata/goodstrap/lib/Bubble/BubbleHoverTrigger");
var ConfigSection_1 = require("../configurationControls/ConfigSection");
var CheckboxControl_1 = require("../configurationControls/CheckboxControl");
var DataLabelsControl_1 = require("../configurationControls/DataLabelsControl");
var bubble_1 = require("../../constants/bubble");
var BaseChartConfigurationPanel_1 = require("./BaseChartConfigurationPanel");
var LineChartBasedConfigurationPanel = /** @class */ (function (_super) {
__extends(LineChartBasedConfigurationPanel, _super);
function LineChartBasedConfigurationPanel() {
return _super !== null && _super.apply(this, arguments) || this;
}
LineChartBasedConfigurationPanel.prototype.renderConfigurationPanel = function () {
var _a = this.getControlProperties(), gridEnabled = _a.gridEnabled, axes = _a.axes;
var _b = this.props, properties = _b.properties, propertiesMeta = _b.propertiesMeta, pushData = _b.pushData;
var controlsDisabled = this.isControlDisabled();
return (React.createElement(BubbleHoverTrigger_1.default, { showDelay: bubble_1.SHOW_DELAY_DEFAULT, hideDelay: bubble_1.HIDE_DELAY_DEFAULT },
React.createElement("div", null,
this.renderColorSection(),
this.getBaseChartAxisSection(axes),
this.renderLegendSection(),
React.createElement(ConfigSection_1.default, { id: "canvas_section", title: "properties.canvas.title", propertiesMeta: propertiesMeta, properties: properties, pushData: pushData },
React.createElement(DataLabelsControl_1.default, { pushData: pushData, properties: properties, isDisabled: controlsDisabled, defaultValue: false }),
React.createElement(CheckboxControl_1.default, { valuePath: "grid.enabled", labelText: "properties.canvas.gridline", properties: properties, checked: gridEnabled, disabled: controlsDisabled, pushData: pushData }))),
React.createElement(Bubble_1.default, { className: this.getBubbleClassNames(), arrowOffsets: { "tc bc": [bubble_1.BUBBLE_ARROW_OFFSET_X, bubble_1.BUBBLE_ARROW_OFFSET_Y] }, alignPoints: [{ align: "tc bc" }] },
React.createElement(react_intl_1.FormattedMessage, { id: "properties.config.not_applicable" }))));
};
return LineChartBasedConfigurationPanel;
}(BaseChartConfigurationPanel_1.default));
exports.default = LineChartBasedConfigurationPanel;
//# sourceMappingURL=LineChartBasedConfigurationPanel.js.map