Browse Source

hotfix

core-0.6.23
rozetko 10 months ago
parent
commit
a34c0574e4
  1. 10
      react/ChartwerkLinePod.tsx

10
react/ChartwerkLinePod.tsx

@ -17,7 +17,7 @@ export type ChartwerkLinePodProps = {
} }
export function ChartwerkLinePod(props: ChartwerkLinePodProps) { export function ChartwerkLinePod(props: ChartwerkLinePodProps) {
const [pod, setPod] = useState<LinePod | null>(null); const [pod, setPod] = useState<LinePod | null>(null);
const [hack, setHack] = useState<number | null>(null); const [hack, setHack] = useState<number | null>(null);
@ -47,8 +47,12 @@ export function ChartwerkLinePod(props: ChartwerkLinePodProps) {
setPod(newPod); setPod(newPod);
newPod.render(); newPod.render();
} else { } else {
pod.updateMarkers(props.markersConf); if(props.markersConf) {
pod.updateSegments(props.segments); pod.updateMarkers(props.markersConf);
}
if(props.segments) {
pod.updateSegments(props.segments);
}
// TODO: actually it's wrong logic with updates // TODO: actually it's wrong logic with updates
// because it creates new pod anyway // because it creates new pod anyway
pod.updateData(props.series, props.options); pod.updateData(props.series, props.options);

Loading…
Cancel
Save