Merge pull request #1726 from appwrite/fix-usage-bucket-chart

fix: add option to usage bucket chart to be cumulative
This commit is contained in:
Darshan
2025-03-06 12:23:58 +05:30
committed by GitHub
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -86,6 +86,7 @@
export let countMetadata: MetricMetadata;
export let path: string = null;
export let hideSelectPeriod: boolean = false;
export let isCumulative: boolean = false;
</script>
<Container>
@@ -118,7 +119,9 @@
series={[
{
name: countMetadata.legend,
data: accumulateFromEndingTotal(count, total)
data: isCumulative
? count.map((m) => [m.date, m.value])
: accumulateFromEndingTotal(count, total)
}
]} />
</div>
@@ -30,4 +30,5 @@
legend: 'Image transformations',
title: 'Total transformations'
}}
isCumulative
hideSelectPeriod />