In a line+bar chart, the date was being set incorrectly due to the fact
we did not pass in the point index to the x-axis computation.
This fix passes it in, so now the tooltip can be calculated correctly.
There is a bug in the line+bar chart that caused the tooltip to keep
being append with left/right axis information. We fix this by saving
the original key and using that for the append.
If you disabled a series in a multi-bar chart (either horizontal or
vertical), you would get incorrect tooltips. This was caused by the
fact that we only set the mouseover on the `enter()` elements, which
meant that nothing was being set when the chart was updated due to the
hiding. This caused us to close over the original value of the data
The fix is to set the mouseover on the entire selection, which updates
it every time the chart is updated. This also contains a small fix to
the horizontal multi-bar chart to have a more descriptive tooltip.
It turns out there was a bug in d3 2.9.2 that made the transition
continuously override the text-anchor property. This was fixed here:
https://github.com/mbostock/d3/pull/684
This pull request contains d3 2.9.6, and also makes a small fix to
handle both negative and positive rotations. Finally, it updates the
discreteBarChart sample to use it.
Horizontal bar charts didn't update correctly - the data that the width
was calculated by was bound to previous values.
The fix was to use `select()` instead of `selectAll` on the bars
themselves (since there is only a single `rect` element in each). This
is because `selectAll` doesn't propagate data bindings, per the
following links:
https://groups.google.com/forum/?fromgroups#!topic/d3-js/PUansS150J0https://groups.google.com/forum/?fromgroups#!topic/d3-js/272vChmijIw
It works the first time because of the `.enter()` definition which will
cause data to propagate, as mentioned in the above threads.
lineWithFocusChart uses two separate line charts, and this change
ensures that any x/y value getter (e.g. `chart.x(...)`) set on the main
line chart is also migrated to the focus chart.