Closed kanth609 closed 3 months ago
svg is exposed through the state, so in theory, you could do
chart.svgWidth(300);
chart.getState().svg.attr('width,300)
But something feels wrong with this approach
thanks @bumbeishvili , can you pls let me know why do you feel it is wrong, so that i can find the different approach to update the width of svg. thanks!
thanks @bumbeishvili , can you pls let me know why do you feel it is wrong, so that i can find the different approach to update the width of svg. thanks!
Because render should be working normally and you should not be losing anything?
yeah you're ryt, as i'm applying some styles to the selected node and if i call the render()
, it is getting removed also if nodes are huge, i don't wanna re-render the chart. so thinking to go ahead with the approach which you suggested above. :)
Hello :), so basically, i'm trying to update the
svg
width dynamically usingsvgWidth(<value>)
but i have to call therender()
function to update width in the DOM, as i'm loosing the added classes when therender()
is called. So checking here if is there a way to update the svg width without callingrender()
?