Skip to content

Commit 248d186

Browse files
committed
feat: add charts in compare page
1 parent 79bf02a commit 248d186

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script setup lang="ts">
2+
import DownloadAnalytics from '../Package/DownloadAnalytics.vue'
3+
4+
const { packages } = defineProps<{
5+
packages: string[]
6+
}>()
7+
</script>
8+
9+
<template>
10+
<div class="font-mono">
11+
<DownloadAnalytics :package-names="packages" :in-modal="false" />
12+
</div>
13+
</template>

app/pages/compare.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ useSeoMeta({
153153
:headers="gridHeaders"
154154
/>
155155
</div>
156+
157+
<h2
158+
id="comparison-heading"
159+
class="text-xs text-fg-subtle uppercase tracking-wider mb-4 mt-10"
160+
>
161+
downloads history
162+
</h2>
163+
164+
<CompareLineChart :packages />
156165
</div>
157166

158167
<div v-else class="text-center py-12" role="alert">

0 commit comments

Comments
 (0)