Note that there are some explanatory texts on larger screens.

plurals
  1. POresponsive d3 area graph stretches circle interaction points
    primarykey
    data
    text
    <p>I have been experimenting with a simple <strong>d3</strong> google analytics-style area graph demo. I'd like to make it stretch to the full width of its container, which I have managed to do. However the little circles are of course stretching out of shape too. I'd like their positions to be responsive, but not their dimensions (so they remain circular).</p> <p>Fiddle link: <a href="http://jsfiddle.net/46PfK/2/" rel="nofollow">http://jsfiddle.net/46PfK/2/</a></p> <p>I'm trying to use the <a href="http://phrogz.net/svg/libraries/SVGPanUnscale.js" rel="nofollow">SVGPanUnscale.js</a> script. I have tried calling it with <code>unscaleEach('.dot');</code> and <code>[].forEach.call($('.dot'),unscale);</code> but neither appear to do anything.</p> <p>This example is responsive in a similar way to mine and uses the script to 'unscale' the axis labels: <a href="http://meloncholy.com/static/demos/responsive-svg-graph-1/" rel="nofollow">http://meloncholy.com/static/demos/responsive-svg-graph-1/</a></p> <p>This example also uses circle elements: <a href="http://phrogz.net/svg/scale-independent-elements.svg" rel="nofollow">http://phrogz.net/svg/scale-independent-elements.svg</a></p> <p>I looked at solutions involving the css attribute:</p> <pre><code>circle { vector-effect: non-scaling-stroke; } </code></pre> <p>which created a circular stroke on an ellipse - weird.</p> <p>A CSS solution would be preferable to a JS one, provided it works across browsers.</p> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload