mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 21:57:16 +01:00
Fixed realtime chart for relational. Removed getDateArray. Added chart min/max dates.
This commit is contained in:
parent
9311f0a183
commit
647dcb5f25
7 changed files with 46 additions and 46 deletions
|
|
@ -12,6 +12,8 @@ export interface BarChartProps extends ChartProps {
|
|||
renderYLabel?: (label: string, index: number, values: any[]) => string;
|
||||
XAxisType?: string;
|
||||
YAxisType?: string;
|
||||
minDate?: number | string;
|
||||
maxDate?: number | string;
|
||||
}
|
||||
|
||||
export function BarChart(props: BarChartProps) {
|
||||
|
|
@ -24,6 +26,8 @@ export function BarChart(props: BarChartProps) {
|
|||
XAxisType = 'time',
|
||||
YAxisType = 'linear',
|
||||
stacked = false,
|
||||
minDate,
|
||||
maxDate,
|
||||
} = props;
|
||||
|
||||
const options: any = useMemo(() => {
|
||||
|
|
@ -32,6 +36,8 @@ export function BarChart(props: BarChartProps) {
|
|||
x: {
|
||||
type: XAxisType,
|
||||
stacked: true,
|
||||
min: minDate,
|
||||
max: maxDate,
|
||||
time: {
|
||||
unit,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue