Browse Source

markers++

pull/33/head
glitch4347 11 months ago
parent
commit
d97b0e9b0c
  1. 12
      react/ChartwerkLinePod.tsx
  2. 1
      src/index.ts

12
react/ChartwerkLinePod.tsx

@ -39,19 +39,14 @@ export function ChartwerkLinePod(props: ChartwerkLinePodProps) {
useEffect(() => {
// this function will be called on component unmount
return () => {
if(pod === null) {
return;
}
if(pod === null) { return; }
// @ts-ignore
pod.removeEventListeners();
}
}, []);
useEffect(() => {
if(chart === null) {
return;
}
if(chart === null) { return; }
if(pod === null) {
console.log('create chart');
console.log("markers");
@ -63,11 +58,12 @@ export function ChartwerkLinePod(props: ChartwerkLinePodProps) {
props.series,
props.options,
props.markers,
props.segments
// props.segments
);
setPod(newPod);
newPod.render();
} else {
console.log('update data');
pod.updateData(props.series, {
...props.options,
});

1
src/index.ts

@ -33,7 +33,6 @@ class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
) {
super(_el, _series, _options);
this.series = new LineSeries(_series);
console.log('CREATE LINPOD NEW VERSION')
}
override renderMetrics(): void {

Loading…
Cancel
Save