rawgraphs / rawgraphs-core

RAWGraphs core library
https://rawgraphs.github.io/rawgraphs-core/docs/
Apache License 2.0
55 stars 11 forks source link

Add dom element as getter/setter #1

Closed uf0 closed 3 years ago

uf0 commented 4 years ago

Why don't we manage the DOM element as other chart prop (data,etc) with getter/setter and avoid https://github.com/rawgraphs/rawgraphs-core/blob/api-experiments/src/raw.js#L111

const mychart = chart(visualModel, config, DOM_node)
bianchimro commented 3 years ago

Because other props can be just set with no side effects on the DOM, while "binding" to a DOM node happens when the chart is rendered to the node with renderToDom