Fixing line chart with SVG resize tooltip issues.

master
Robin Hu 11 years ago
parent 94efcbad66
commit 5f5c298ec7

@ -23,7 +23,7 @@ svg {
<a href="#" id="zoomIn">Zoom In</a> <a href="#" id="zoomOut">Zoom Out</a>
</div>
<div id="chart1">
<div id="chart1" class='with-transitions'>
<svg></svg>
</div>

@ -90,6 +90,9 @@ window.nv.tooltip.* also has various helper methods.
function convertViewBoxRatio() {
if (chartContainer) {
var svg = d3.select(chartContainer);
if (svg.node().tagName !== "svg") {
svg = svg.select("svg");
}
var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
if (viewBox) {
viewBox = viewBox.split(' ');

Loading…
Cancel
Save