add 30 min active user histogram

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-13 23:18:24 +01:00
parent 2572da3456
commit f32dc4711a
34 changed files with 570 additions and 457 deletions

View File

@@ -10,7 +10,7 @@ import { round } from '@/utils/math';
import * as mathjs from 'mathjs';
import { sort } from 'ramda';
import { chQuery } from '@mixan/db';
import { chQuery, convertClickhouseDateToJs } from '@mixan/db';
export type GetChartDataResult = Awaited<ReturnType<typeof getChartData>>;
export interface ResultItem {
@@ -73,7 +73,7 @@ function fillEmptySpotsInTimeline(
const getMinute = (date: Date) => date.getUTCMinutes();
const item = items.find((item) => {
const date = new Date(item.date);
const date = convertClickhouseDateToJs(item.date);
if (interval === 'month') {
return (