prodap-chatbot-domain
Version:
Classes utilizadas na resposta de todas as Intents do Assistente Virtual
31 lines • 1.08 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ChartAbstract_1 = require("./ChartAbstract");
const ChartTypes_1 = require("./ChartTypes");
class StackedBarChart extends ChartAbstract_1.default {
constructor(chartProps) {
super(chartProps, ChartTypes_1.default.STACKED_BAR_CHART, '');
this.data = [];
this.chartData = { data: [] };
this.legendData = [];
this.rules = [];
this.chart = true;
this.chartColorScale = [];
this.titleAxisX = chartProps.titleAxisX;
this.titleAxisY = chartProps.titleAxisY;
this.showLegend = chartProps.showLegend || false;
const values = chartProps.data;
if (values) {
values.forEach((value) => {
this.chartData.data.push(value);
this.chartColorScale.push(value.color);
});
}
}
addData(rows) {
this.data = this.data.concat(rows);
return this;
}
}
exports.default = StackedBarChart;
//# sourceMappingURL=StackedBarChart.js.map