@@ -20,7 +20,7 @@ import type {
2020import { DATE_INPUT_MAX } from ' ~/utils/input'
2121import { applyDataCorrection } from ' ~/utils/chart-data-correction'
2222import { applyBlocklistCorrection , getAnomaliesForPackages } from ' ~/utils/download-anomalies'
23- import { copyAltTextForTrendLineChart , sanitise , loadFile } from ' ~/utils/charts'
23+ import { copyAltTextForTrendLineChart , sanitise , loadFile , applyEllipsis } from ' ~/utils/charts'
2424
2525import (' vue-data-ui/style.css' )
2626
@@ -215,7 +215,7 @@ function formatXyDataset(
215215 const temperatureColors = lightColor ? [lightColor , accent .value ] : undefined
216216
217217 const datasetItem: VueUiXyDatasetItem = {
218- name: seriesName ,
218+ name: applyEllipsis ( seriesName , 32 ) ,
219219 type: ' line' ,
220220 series: dataset .map (d => d .value ),
221221 color: accent .value ,
@@ -1050,7 +1050,7 @@ const chartData = computed<{
10501050 .filter (index => index !== - 1 )
10511051
10521052 const item: VueUiXyDatasetItem = {
1053- name: pkg ,
1053+ name: applyEllipsis ( pkg , 32 ) ,
10541054 type: ' line' ,
10551055 series ,
10561056 dashIndices ,
@@ -1111,10 +1111,10 @@ function buildExportFilename(extension: string): string {
11111111
11121112 if (! isMultiPackageMode .value ) {
11131113 const name = effectivePackageNames .value [0 ] ?? props .packageName ?? ' package'
1114- return ` ${sanitise (name )}-${g }_${range }.${extension } `
1114+ return ` ${sanitise (applyEllipsis ( name , 32 ) )}-${g }_${range }.${extension } `
11151115 }
11161116
1117- const names = effectivePackageNames .value
1117+ const names = effectivePackageNames .value . map ( name => applyEllipsis ( name , 32 ))
11181118 const label = names .length === 1 ? names [0 ] : names .join (' _' )
11191119 return ` ${sanitise (label ?? ' ' )}-${g }_${range }.${extension } `
11201120}
0 commit comments