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

How to get Image (svg or png) of chart? #714

Open
budwol opened this issue Nov 12, 2023 · 0 comments
Open

How to get Image (svg or png) of chart? #714

budwol opened this issue Nov 12, 2023 · 0 comments

Comments

@budwol
Copy link

budwol commented Nov 12, 2023

I tried:

<Svg ref = {this.props.svgRef}>
   <LineChart />
</Svg>

...
onPress={() => {
svgRef.current?.toDataURL((base64) => {                                    
console.log(base64);
);

but the base64 just contains an empty image.

the graph i want to get as svg or png looks like this:

image

can anyone 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