novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.15k forks source link

Group / Stacked Bar Chart - A <base href> tag in the header breaks the yDomain boundary #455

Open JiaxiJin opened 10 years ago

JiaxiJin commented 10 years ago

The issue can be reproduced by

  1. Go to http://nvd3.org/livecode
  2. Activiate the demo for Group / Stacked Bar Chart
  3. In Chart Code (JS) tab, give the chart a yDomain boundary like var chart = nv.models.multiBarChart() .yDomain([1, 5]); You will see that the bar are cut by the bound.
  4. In Markup (HTML/CSS) tab, add a header like

    You will see that the yAxis ticks remains bounded however the bars (either grouped or stacked) exceeds the bound, the yDomain setting isn't working any more.

JiaxiJin commented 10 years ago

Correction in step 4:

<head "bracket" <base href="/" "bracket" </head "bracket"

The bracketed content won't be displayed, so please replace the "bracket" with > after copy and pasting.