(core) Fix js error when changing X Axis with chart with no series

Summary:
This error only occured for certain charts type. Some chart handled it correctly, others did not.

This brings a more general handling of this issue which should work for all charts.

Test Plan: New nbrowser test case.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3303
pull/165/head
Cyprien P 2 years ago
parent 5213972d24
commit 0da397ab90

@ -288,7 +288,7 @@ export class ChartView extends Disposable {
dataOptions.totalFormatter = this._formatterComp.peek();
}
if (!options.multiseries) {
if (!options.multiseries && series.length) {
plotData = chartFunc(series, options, dataOptions);
} else if (series.length > 1) {
// We need to group all series by the first column.

Loading…
Cancel
Save