Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
scatterSeries.data = params.data;
scatterSeries.yField = f.colId;
scatterSeries.yFieldName = f.displayName;
var palette = _this.overriddenPalette ? _this.overriddenPalette : _this.chartProxyParams.getSelectedPalette();
var fills = palette.fills;
scatterSeries.fill = fills[index % fills.length];
var strokes = palette.strokes;
scatterSeries.stroke = strokes[index % strokes.length];
if (!existingSeries) {
chart.addSeries(scatterSeries);
}
}
};
if (defaultCategorySelected) {
if (chartType === ag_grid_community_1.ChartType.Bubble) {
// only update bubble chart if the correct number of fields are present
var len = params.fields.length;
var offset = len % 2 === 0 ? 1 : 0;
var fields = [];
for (var i = 1; i < len - offset; i += 2) {
fields.push(params.fields[i]);
}
fields.forEach(updateFunc);
}
else {
params.fields.slice(1, params.fields.length).forEach(updateFunc);
}
}
else {
params.fields.forEach(updateFunc);
}
root.append(bottomAxis);
_this.updateColors(fills, strokes);
return _this;
}
MiniStackedColumn.prototype.init = function () {
this.scene.canvas.element.title = this.chartTranslator.translate('stackedColumnTooltip');
};
MiniStackedColumn.prototype.updateColors = function (fills, strokes) {
this.bars.forEach(function (series, i) {
series.forEach(function (bar) {
bar.fill = fills[i];
bar.stroke = strokes[i];
});
});
};
MiniStackedColumn.chartType = ag_grid_community_1.ChartType.StackedColumn;
__decorate([
ag_grid_community_1.PostConstruct,
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], MiniStackedColumn.prototype, "init", null);
return MiniStackedColumn;
}(MiniChart));
var MiniStackedBar = /** @class */ (function (_super) {
BarChartProxy.isBarChart = function (type) {
return type === ag_grid_community_1.ChartType.GroupedBar || type === ag_grid_community_1.ChartType.StackedBar || type === ag_grid_community_1.ChartType.NormalizedBar;
};
BarChartProxy.prototype.defaultOptions = function () {
BarChartProxy.isBarChart = function (type) {
return type === ag_grid_community_1.ChartType.GroupedBar || type === ag_grid_community_1.ChartType.StackedBar || type === ag_grid_community_1.ChartType.NormalizedBar;
};
BarChartProxy.prototype.defaultOptions = function () {
function DoughnutChartProxy(params) {
var _this = _super.call(this, params) || this;
_this.initChartOptions(ag_grid_community_1.ChartType.Doughnut, _this.defaultOptions());
_this.chart = chartBuilder_1.ChartBuilder.createDoughnutChart(_this.chartOptions);
return _this;
}
DoughnutChartProxy.prototype.update = function (params) {
labelFontStyle: undefined,
labelFontWeight: undefined,
labelFontSize: 12,
labelFontFamily: 'Verdana, sans-serif',
labelColor: this.getLabelColor(),
itemPaddingX: 16,
itemPaddingY: 8,
markerPadding: 4,
markerSize: 14,
markerStrokeWidth: 1
},
seriesDefaults: {
type: 'area',
fills: palette.fills,
strokes: palette.strokes,
fillOpacity: this.chartProxyParams.chartType === ag_grid_community_1.ChartType.Area ? 0.7 : 1,
normalizedTo: this.chartProxyParams.chartType === ag_grid_community_1.ChartType.NormalizedArea ? 100 : undefined,
strokeWidth: 3,
marker: true,
markerSize: 6,
markerStrokeWidth: 1,
tooltipEnabled: true,
tooltipRenderer: undefined,
showInLegend: true,
shadow: undefined
}
};
};
return AreaChartProxy;
ChartService.prototype.chartCurrentRange = function (chartType) {
if (chartType === void 0) { chartType = ag_grid_community_1.ChartType.GroupedColumn; }
var selectedRange = this.getSelectedRange();
return this.chartRange(selectedRange, chartType);
};
ChartService.prototype.chartCellRange = function (params) {
GridChartComp.prototype.isXYChart = function () {
return [ag_grid_community_1.ChartType.Scatter, ag_grid_community_1.ChartType.Bubble].indexOf(this.model.getChartType()) > -1;
};
GridChartComp.prototype.destroy = function () {
ChartFormattingPanel.prototype.isBarChart = function (chartType) {
return [
ag_grid_community_1.ChartType.GroupedColumn,
ag_grid_community_1.ChartType.StackedColumn,
ag_grid_community_1.ChartType.NormalizedColumn,
ag_grid_community_1.ChartType.GroupedBar,
ag_grid_community_1.ChartType.StackedBar,
ag_grid_community_1.ChartType.NormalizedBar
].indexOf(chartType) > -1;
};
ChartFormattingPanel.prototype.addComponent = function (component) {
function DoughnutChartProxy(params) {
var _this = _super.call(this, params) || this;
_this.chartOptions = _this.getChartOptions(ag_grid_community_1.ChartType.Doughnut, _this.defaultOptions());
_this.chart = chartBuilder_1.ChartBuilder.createDoughnutChart(_this.chartOptions);
return _this;
}
DoughnutChartProxy.prototype.update = function (params) {