Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vega-tooltips won't show if I have 2 customized vega-tooltips in React component #706

Open
cheerworld opened this issue Oct 2, 2022 · 0 comments

Comments

@cheerworld
Copy link

`import { Handler } from 'vega-tooltip';

const options = {
theme: "dark",
offsetX: 10,
offsetY: 10,
disableDefaultStyle: true,
styleId: 'vega-tooltip-style'
}

export default function DataHealthImage(): JSX.Element {
return (


<VegaLite
spec={graphs[activeStep].spec1}
data={graphs[activeStep].data1}
tooltip={new Handler(options).call}
/>
<VegaLite
spec={graphs[activeStep].spec2}
data={graphs[activeStep].data2}
tooltip={new Handler(options).call}
/>

}
`
I have 2 vega graphs in this component. When I only call Vega-tooltip in one VegaLite graph, the theme does apply, and works.
After I added the handler call to the other graph, and refresh the page, tooltips are gone and didn't work.

If I make some changes, delete one tooltip handler call from the vega graph and add it back without refresh the page, the tooltips does show.

I am not sure what the problem is. How can I get both graphs to show customized tooltips after refreshing?

Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant