# HG changeset patch # User Chris Cannam # Date 1498832498 -3600 # Node ID f2b62195a5a6d1d3fa3fe5494af9c0f2d7580cad # Parent de23ea6bcd0d91fdd58c77b7768f6c668ad6e8c4 Use bin numbers for scale labels if bin names are not provided diff -r de23ea6bcd0d -r f2b62195a5a6 src/app/visualisations/grid/grid.component.ts --- a/src/app/visualisations/grid/grid.component.ts Fri Jun 30 12:08:50 2017 +0100 +++ b/src/app/visualisations/grid/grid.component.ts Fri Jun 30 15:21:38 2017 +0100 @@ -67,6 +67,13 @@ } get binNames(): string[] { + if (!this.feature.binNames || this.feature.binNames.length === 0) { + const binCount = (this.feature.data.length > 0 ? + this.feature.data[0].length : 0); + for (let i = 0; i < binCount; ++i) { + this.feature.binNames.push("" + (i + 1)); + } + } return this.feature.binNames; } }