[Canvas components] allow to get the canvas
See original GitHub issueIs your feature request related to a problem? Please describe. The problem is to export graphs into png
Describe the solution you’d like
A neat way to export canvas is to use toDataURL
web api of canvas. To do this I need to be able to access the canvas. The solutions i am seeing are:
- allow users to use ref and forward it to canvas.
- if this is not possible because of how refs are used internally then provide a function getCanvas that gives back the current canvas ref
- worst solution, allow user to add an id tag that will be then able to query using
document.getElementById
Describe alternatives you’ve considered Haven’t considered but open to suggestions
Additional context I am willing to do the changes myself via a PR, just interested in knowing what an acceptable solution is to you so i don’t do this in vein 😃
And if you arrived here, thanks for maintaining this awesome library
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Canvas component overview (contains video) - Power Apps
Components are reusable building blocks for canvas apps so that app makers can create custom controls to use inside an app, or across...
Read more >Canvas Components - Braze
With Canvas components, you can unlock new user journeys to improve your process and increase the effectiveness of your audience outreach.
Read more >The Graphics Canvas element - HTML - MDN Web Docs
Use the HTML element with either the canvas scripting API or the WebGL API to draw graphics and animations.
Read more >Field Admin Console Canvas Components
This document discusses the four Canvas Component fields that can be set within a case in the Admin Console. These fields allow Field...
Read more >Components on the JavaScript Canvas | by Dr Abstract | Medium
The Button component gets mousedown or click events but most of the other components have a change event. Let's try a few out....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi everybody,
I’m working with the Orbit team (@phacks and @dzello) on this topic. Thanks to the earlier discussion, I have something working already for the Line chart (see https://github.com/orbit-love/nivo/commit/8bd3a7e92f9c9ac91f7623054bdc3757af796651)
I’d like your feedback on the solution:
Right now we don’t need charts beyond the lines and bars, does it make sense to provide this feature to all canvas based components? Would a PR with only the lines and bars be accepted?
Thanks for your time 😃
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!