prodap-chatbot-domain
Version:
Classes utilizadas na resposta de todas as Intents do Assistente Virtual
41 lines • 1.47 kB
JavaScript
"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 PieChart extends ChartAbstract_1.default {
constructor(props) {
super(props, ChartTypes_1.default.PIE_CHART, '');
this.data = [];
this.hasLabels = props.hasLabels;
this.hasLegends = props.hasLegends;
this.hasTitle = props.hasTitle;
this.innerRadius = props.innerRadius;
this.theme = props.theme;
this.startAngle = props.startAngle;
this.endAngle = props.endAngle;
this.padAngle = props.padAngle;
this.gauge = props.gauge;
this.minimumLabelValue = props.minimumLabelValue;
this.padding = props.padding;
this.chart = true;
this.chartData = [];
this.legendData = [];
this.chartColorScale = [];
const data = props.data;
if (data) {
data.forEach((value) => {
this.chartData.push(new ChartData_1.default(value));
this.legendData.push(new legends_1.default(value));
this.chartColorScale.push(value.color);
});
}
}
addData(...rows) {
this.data = this.data.concat(rows);
return this;
}
}
exports.default = PieChart;
//# sourceMappingURL=PieChart.js.map