| 295 | table.caption.textContent = report.options.name; |
| 296 | const rows = document.createDocumentFragment(); |
| 297 | const text = value => { |
| 298 | if (value === null || value === undefined) return ''; |
| 299 | if (Array.isArray(value)) return value.map(text).join(' – '); |
| 300 | if (typeof value === 'number') return value.toLocaleString(undefined, {maximumSignificantDigits: 21}); |
| 301 | return String(value); |
| 302 | }; |
| 303 | chart.data.datasets.forEach((dataset, datasetIndex) => { |
| 304 | if (!chart.isDatasetVisible(datasetIndex)) return; |
| 305 | dataset.data.forEach((point, index) => { |