mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #1826 from appwrite/fix-show-legend-data-reads-writes-that-correspond-with-graph
Fix: Show the summation of the graph, not the totals
This commit is contained in:
@@ -31,8 +31,20 @@
|
||||
$: projects = (data.organizationUsage as OrganizationUsage).projects;
|
||||
|
||||
$: legendData = [
|
||||
{ name: 'Reads', value: data.organizationUsage.databasesReadsTotal },
|
||||
{ name: 'Writes', value: data.organizationUsage.databasesWritesTotal }
|
||||
{
|
||||
name: 'Reads',
|
||||
value: data.organizationUsage.databasesReads.reduce(
|
||||
(sum, singleDay) => sum + singleDay.value,
|
||||
0
|
||||
)
|
||||
},
|
||||
{
|
||||
name: 'Writes',
|
||||
value: data.organizationUsage.databasesWrites.reduce(
|
||||
(sum, singleDay) => sum + singleDay.value,
|
||||
0
|
||||
)
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user