From 26d5956c17a2c781adf80080b17d4ebf9189c025 Mon Sep 17 00:00:00 2001 From: glitch4347 Date: Thu, 14 Dec 2023 15:29:13 +0100 Subject: [PATCH] markers conf in react --- react/ChartwerkLinePod.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/react/ChartwerkLinePod.tsx b/react/ChartwerkLinePod.tsx index dcae2d4..16e0cdb 100644 --- a/react/ChartwerkLinePod.tsx +++ b/react/ChartwerkLinePod.tsx @@ -1,7 +1,7 @@ import { LineTimeSerie, LineOptions, LinePod } from '@chartwerk/line-pod'; import { AxisRange } from '@chartwerk/core/dist/types'; -import { MarkerSerie } from '@chartwerk/line-pod/dist/models/marker'; +import { MarkersConf } from '@chartwerk/line-pod/dist/models/marker'; import { SegmentSerie } from '@chartwerk/line-pod/dist/models/segment'; import { useEffect, useRef, useState } from 'react'; @@ -13,7 +13,7 @@ export type ChartwerkLinePodProps = { id?: string; series: LineTimeSerie[]; options?: LineOptions; - markers?: MarkerSerie[], + markersConf?: MarkersConf, segments?: SegmentSerie[], className?: string; // TODO: callback types should be exported from chartwerk @@ -91,7 +91,7 @@ export function ChartwerkLinePod(props: ChartwerkLinePodProps) { ...props.options, eventsCallbacks }, - props.markers, + props.markersConf, props.segments ); setPod(newPod); @@ -99,7 +99,7 @@ export function ChartwerkLinePod(props: ChartwerkLinePodProps) { } else { pod.updateData(props.series, props.options); } - }, [chart, pod, props.id, props.options, props.markers, props.segments]); + }, [chart, pod, props.id, props.options, props.markersConf, props.segments]); // TODO: it's a hack to render the LinePod right after the div appears in DOM setTimeout(() => {