Browse Source

fix

react-bar-pod
vargburz 3 months ago
parent
commit
248cee5519
  1. 10
      react/ChartwerkBarPod.tsx

10
react/ChartwerkBarPod.tsx

@ -1,4 +1,4 @@
import { BarSerie, BarOptions, ChartwerkBarPod as BarPod } from '@chartwerk/bar-pod';
import { BarSerie, BarOptions, ChartwerkBarPod } from '@chartwerk/bar-pod';
import { useEffect, useRef, useState } from 'react';
@ -12,9 +12,9 @@ export type ChartwerkBarPodProps = {
className?: string;
}
export function ChartwerkBarPod(props: ChartwerkBarPodProps) {
export function ChartwerkReactBarPod(props: ChartwerkBarPodProps) {
const [pod, setPod] = useState<BarPod | null>(null);
const [pod, setPod] = useState<ChartwerkBarPod | null>(null);
const [hack, setHack] = useState<number | null>(null);
const chartRef = useRef(null);
@ -32,7 +32,7 @@ export function ChartwerkBarPod(props: ChartwerkBarPodProps) {
useEffect(() => {
if(chart === null) { return; }
if(pod === null) {
const newPod = new BarPod(
const newPod = new ChartwerkBarPod(
// @ts-ignore
chart,
props.series,
@ -60,4 +60,4 @@ export function ChartwerkBarPod(props: ChartwerkBarPodProps) {
);
}
export default ChartwerkBarPod;
export default ChartwerkReactBarPod;

Loading…
Cancel
Save