mirror of
https://github.com/directus/directus.git
synced 2026-01-30 15:58:22 -05:00
Fix time-series
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="time-series" ref="chartEl" />
|
||||
<div ref="chartEl" class="time-series" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -101,7 +101,7 @@ export default defineComponent({
|
||||
try {
|
||||
const results = await api.get(`/items/${props.options.collection}`, {
|
||||
params: {
|
||||
group: getGroups(),
|
||||
groupBy: getGroups(),
|
||||
aggregate: {
|
||||
[props.options.function]: [props.options.valueField],
|
||||
},
|
||||
@@ -132,9 +132,7 @@ export default defineComponent({
|
||||
data: metrics.value.map((metric) => ({
|
||||
x: toISO(metric),
|
||||
y: Number(
|
||||
Number(metric[`${props.options.valueField}_${props.options.function}`]).toFixed(
|
||||
props.options.decimals ?? 0
|
||||
)
|
||||
Number(metric[props.options.function][props.options.valueField]).toFixed(props.options.decimals ?? 0)
|
||||
),
|
||||
})),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user