comparison src/app/visualisations/grid/grid.component.ts @ 474:f2b62195a5a6

Use bin numbers for scale labels if bin names are not provided
author Chris Cannam <cannam@all-day-breakfast.com>
date Fri, 30 Jun 2017 15:21:38 +0100
parents de23ea6bcd0d
children e3cbf4c53e5e
comparison
equal deleted inserted replaced
473:de23ea6bcd0d 474:f2b62195a5a6
65 ) 65 )
66 ]; 66 ];
67 } 67 }
68 68
69 get binNames(): string[] { 69 get binNames(): string[] {
70 if (!this.feature.binNames || this.feature.binNames.length === 0) {
71 const binCount = (this.feature.data.length > 0 ?
72 this.feature.data[0].length : 0);
73 for (let i = 0; i < binCount; ++i) {
74 this.feature.binNames.push("" + (i + 1));
75 }
76 }
70 return this.feature.binNames; 77 return this.feature.binNames;
71 } 78 }
72 } 79 }