UNPKG

prodap-chatbot-domain

Version:

Classes utilizadas na resposta de todas as Intents do Assistente Virtual

49 lines 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ChartAbstract_1 = require("./ChartAbstract"); const ChartData_1 = require("./ChartData"); const ChartTypes_1 = require("./ChartTypes"); const legends_1 = require("./legends"); class BarChartGroup extends ChartAbstract_1.default { constructor(props) { super(props, ChartTypes_1.default.BAR_CHART_GROUPED, ''); this.data = []; this.rules = []; this.chartColorScale = []; this.legendData = []; this.chartData = []; this.barWidth = props.barWidth; this.titleAxisX = props.titleAxisX; this.titleAxisY = props.titleAxisY; this.minimumBars = props.minimumBars; this.data = []; this.legendData = []; this.rules = []; this.chartColorScale = []; this.groupData = props.groupData; const values = props.data; const dataRules = props.rules; const groupBarData = props.groupData; if (values) { dataRules === null || dataRules === void 0 ? void 0 : dataRules.forEach((r) => { this.rules.push(r); r.subtitle = r.label; this.legendData.push(new legends_1.default(r)); }); values.forEach((value) => { this.chartData.push(new ChartData_1.default(value)); this.chartColorScale.push(value.color); }); } } addData(...rows) { this.data = this.data.concat(rows); return this; } addRule(...rules) { this.rules = this.rules.concat(rules); return this; } } exports.default = BarChartGroup; //# sourceMappingURL=BarChartGroup.js.map