I drew a bubble chart with d3 like the picture below. However, if the screen width value is reduced to less than 764px, the number of bubbles, the r (radius value) of the circle, and the distance value of each g tag (circle) should be adjusted.
Is there a way to adjust it to jquery or css?
![
What you're talking about is probably a situation where certain bubbles should not be seen at all on a screen below a certain width. But it doesn't seem like an issue that's going to be solved by giving a particular bubble display: none;
. (No? Please find out.))
If I were you, I would call a function whenever the window.resize
event occurs. What the function does is:
And call this function once when the window is loaded for the first time. This approach would certainly work. Try it! There's no right answer to programming.
+ If you want to respond to the entire bubble chart, you can just wrap it in a viewbox.I don't know if you asked me this.
577 PHP ssh2_scp_send fails to send files as intended
600 GDB gets version error when attempting to debug with the Presense SDK (IDE)
568 Who developed the "avformat-59.dll" that comes with FFmpeg?
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
610 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.