We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4dfa60 commit aa5f370Copy full SHA for aa5f370
1 file changed
app/utils/charts.ts
@@ -543,13 +543,15 @@ export function createAltTextForVersionsBarChart({
543
}: AltCopyArgs<VersionsBarDataset>) {
544
if (!dataset) return ''
545
546
- const versions = dataset.bars[0]?.series.map((value, i) => ({
547
- name: config.datapointLabels[i],
+ const series = dataset.bars[0]?.series
+ const versions = series?.map((value, i) => ({
548
+ name: config.datapointLabels[i] ?? '-',
549
+ rawDownloads: value ?? 0,
550
downloads: config.numberFormatter(value),
551
}))
552
553
const versionWithMaxDownloads = versions?.reduce((max, current) => {
- return current.downloads > max.downloads ? current : max
554
+ return current.rawDownloads > max.rawDownloads ? current : max
555
})
556
557
const per_version_analysis = versions
0 commit comments