Skip to content

Commit 72a774e

Browse files
committed
Fixiki
1 parent d41b691 commit 72a774e

7 files changed

Lines changed: 15 additions & 19 deletions

File tree

components/modules/stats/ChartCardPreview.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,9 @@ watch(
219219
<DiffChip :value="diff" :invert="series.name === 'block_time'" />
220220
</Flex>
221221

222-
<NuxtLink v-if="series.page" :to="`/stats/${series.page}`">
222+
<NuxtLink v-if="series.page" :to="`/stats/${series.page}${series.aggregate ? '?aggregate=' + series.aggregate : ''}`">
223223
<Flex align="center">
224224
<Icon name="expand" size="16" color="tertiary" :class="$style.link" />
225-
<!-- <Text size="12" color="tertiary" :class="$style.link">View Details</Text> -->
226225
</Flex>
227226
</NuxtLink>
228227
</Flex>

components/modules/stats/LineChart.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,6 @@ onMounted(async () => {
330330
padding: 16px;
331331
}
332332
333-
.header {
334-
335-
}
336-
337333
.chart_wrapper {
338334
position: relative;
339335

components/modules/stats/PieChartCard.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ onMounted(() => {
192192

193193
<template>
194194
<Flex direction="column" justify="start" gap="8" wide :class="$style.wrapper">
195-
<Flex align="center" justify="start" wide :class="$style.header">
195+
<Flex align="center" justify="start" wide>
196196
<Text size="14" weight="600" color="secondary"> {{ `By ${series.title}` }} </Text>
197197
</Flex>
198198

@@ -259,10 +259,6 @@ onMounted(() => {
259259
padding: 16px;
260260
}
261261
262-
.header {
263-
264-
}
265-
266262
.legend_wrapper {
267263
max-width: 55%;
268264
}

components/modules/stats/SquareSizeCard.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ onMounted(async () => {
109109
110110
<template>
111111
<Flex direction="column" justify="between" gap="16" wide :class="$style.wrapper">
112-
<Flex align="center" justify="between" gap="16" :class="$style.header">
112+
<Flex align="center" justify="between" gap="16">
113113
<Flex align="center" gap="10" justify="start" wide>
114114
<Text size="14" weight="600" color="secondary"> Square Size Distribution </Text>
115115
<Text size="14" weight="600" color="tertiary"> (last day) </Text>
@@ -191,10 +191,6 @@ onMounted(async () => {
191191
padding: 16px;
192192
}
193193
194-
.header {
195-
196-
}
197-
198194
.square_size_wrapper {
199195
width: 100%;
200196
justify-content: space-between;

components/modules/stats/SquareSizeChart.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ const buildChart = (chart, onEnter, onLeave) => {
5959
)
6060
}
6161
})
62+
63+
tooltip.value.data.reverse()
6264
}
6365
6466
const onPointerLeft = () => {

pages/stats/[metric].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const cacheStore = useCacheStore()
2828
const route = useRoute()
2929
const router = useRouter()
3030
31-
const series = ref(getSeriesByPage(route.params.metric))
31+
const series = ref(getSeriesByPage(route.params.metric, route.query.aggregate))
3232
3333
if (!series.value.page) {
3434
router.push("/stats")

services/constants/stats.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export const STATS_SERIES = [
111111
],
112112
},]
113113

114+
// TO DO: Replace forEach with for
114115
export function getSeriesByGroupAndType(group, type) {
115116
let series = []
116117
STATS_SERIES.forEach(el => {
@@ -130,12 +131,18 @@ export function getSeriesByGroupAndType(group, type) {
130131
return series
131132
}
132133

133-
export function getSeriesByPage(page) {
134+
export function getSeriesByPage(page, aggregate) {
134135
let series = {}
135136
STATS_SERIES.forEach(el => {
136137
el.series.forEach(s => {
137138
if (s.page === page) {
138-
series = s
139+
if (aggregate) {
140+
if (s.aggregate === aggregate) {
141+
series = s
142+
}
143+
} else {
144+
series = s
145+
}
139146
}
140147
})
141148
})

0 commit comments

Comments
 (0)