Skip to content

Commit 049b409

Browse files
authored
feat: add subtle gradient on modal chart area (#1127)
1 parent 9f510b1 commit 049b409

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

app/components/Package/DownloadAnalytics.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ function formatXyDataset(
174174
type: 'line',
175175
series: dataset.map(d => d.downloads),
176176
color: accent.value,
177+
useArea: true,
177178
},
178179
],
179180
dates: dataset.map(d => d.timestampEnd),
@@ -187,6 +188,7 @@ function formatXyDataset(
187188
type: 'line',
188189
series: dataset.map(d => d.downloads),
189190
color: accent.value,
191+
useArea: true,
190192
},
191193
],
192194
dates: dataset.map(d => d.timestamp),
@@ -200,6 +202,7 @@ function formatXyDataset(
200202
type: 'line',
201203
series: dataset.map(d => d.downloads),
202204
color: accent.value,
205+
useArea: true,
203206
},
204207
],
205208
dates: dataset.map(d => d.timestamp),
@@ -213,6 +216,7 @@ function formatXyDataset(
213216
type: 'line',
214217
series: dataset.map(d => d.downloads),
215218
color: accent.value,
219+
useArea: true,
216220
},
217221
],
218222
dates: dataset.map(d => d.timestamp),
@@ -1044,6 +1048,14 @@ const chartConfig = computed(() => {
10441048
<ClientOnly v-if="chartData.dataset">
10451049
<div>
10461050
<VueUiXy :dataset="chartData.dataset" :config="chartConfig" class="[direction:ltr]">
1051+
<!-- Subtle gradient applied for a unique series (chart modal) -->
1052+
<template #area-gradient="{ series: chartModalSeries, id: gradientId }">
1053+
<linearGradient :id="gradientId" x1="0" x2="0" y1="0" y2="1">
1054+
<stop offset="0%" :stop-color="chartModalSeries.color" stop-opacity="0.2" />
1055+
<stop offset="100%" :stop-color="colors.bg" stop-opacity="0" />
1056+
</linearGradient>
1057+
</template>
1058+
10471059
<!-- Custom legend for multiple series -->
10481060
<template v-if="isMultiPackageMode" #legend="{ legend }">
10491061
<div class="flex gap-4 flex-wrap justify-center">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"vite-plugin-pwa": "1.2.0",
102102
"vite-plus": "0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab",
103103
"vue": "3.5.27",
104-
"vue-data-ui": "3.14.7"
104+
"vue-data-ui": "3.14.8"
105105
},
106106
"devDependencies": {
107107
"@e18e/eslint-plugin": "0.1.4",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)