File tree Expand file tree Collapse file tree
webui/src/pages/extension-detail Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ export const WeeklyDownloads: FunctionComponent<{ extension: Extension }> = ({ e
6666 enabled : analyticsEnabled
6767 } ) ;
6868
69- const counts = useMemo ( ( ) => trailingWeeklySums ( points ?. map ( point => point . count ) ?? [ ] ) , [ points ] ) ;
69+ const daily = useMemo ( ( ) => points ?? [ ] , [ points ] ) ;
70+ const counts = useMemo ( ( ) => trailingWeeklySums ( daily . map ( point => point . count ) ) , [ daily ] ) ;
7071 const hasDownloads = counts . some ( count => count > 0 ) ;
7172 if ( ! analyticsEnabled || counts . length === 0 || ! hasDownloads ) {
7273 return null ;
@@ -90,6 +91,8 @@ export const WeeklyDownloads: FunctionComponent<{ extension: Extension }> = ({ e
9091 showHighlight
9192 color = { theme . palette . secondary . main }
9293 valueFormatter = { value => ( value === null ? '' : `${ value . toLocaleString ( ) } downloads` ) }
94+ // `.MuiAreaElement-root` is the sparkline's area path; lighten its fill to a wash.
95+ sx = { { '& .MuiAreaElement-root' : { fillOpacity : 0.14 } } }
9396 />
9497 </ Box >
9598 </ Box >
You can’t perform that action at this time.
0 commit comments