Commit Graph

17 Commits

Author SHA1 Message Date
Robin Hu
7f71b66b0c Overhauling the logic for creating an interactive layer.
Basically, the <svg> container will now process all mousemove
events. This allows stackedAreaChart and CumulativeLineChart to
maintain some other forms of interaction.
2013-07-25 16:03:05 -04:00
Robin Hu
e182e081bf Major change to interactiveLayer.js. Instead of creating
a svg <rect> element to process mousemove events, we are
attaching the mousemove event to the bounding <svg> container.
This allows stackedAreaChart to maintain some previous interactivity.
2013-07-25 14:23:51 -04:00
Robin Hu
1621b83e7a Cleaning up code in interactiveLayer -> mousemove, regarding
the IE 10 hack. It turns out that d3.event.offsetX/Y contains
the relative mouse coordinates needed. Using those instead.
2013-07-12 20:32:04 -04:00
Robin Hu
7bfc19b21f Adding IE9+ fix so that mousing over a tooltip does not trigger
the elementMouseout dispatch. Without this, tooltips on IE are very buggy.
2013-07-12 17:55:31 -04:00
Robin Hu
d8ba26dc06 Cleaning up code for the MSIE svg.getScreenCTM issue.
REbuilding nv.d3.js
2013-07-11 17:42:28 -04:00
Robin Hu
c13be39c12 Added inline comments.
Changed style td.legend to td.legend-color-guide, becuase it conflicts with another .legend style being used elsewhere.
2013-07-08 09:36:29 -04:00
Robin Hu
1ff26f5fab Optimizing interactive layer code, so d3.mouse(this) is called only once per mousemove. 2013-07-08 09:07:06 -04:00
Robin Hu
75ff9267c8 Finally resolving the nagging issue in IE where tooltips
were not showing up in the right place, due to issue with d3.mouse.

The solution is to take the svg.getBoundingClientRect(), and
taking 25% of it's top and left values.
2013-07-06 23:32:28 -04:00
Robin Hu
14117b32de Fixing a NASTY Microsoft IE bug I found during cross browser testing.
Mousing over SVG.rect returns wrong X,Y coordinates, but only in IE.
2013-07-06 16:44:06 -04:00
Robin Hu
65edf27199 Fixed bug in nv.interactiveBisect, for situations where the xAccessor is
function(d,i) { return i}
2013-07-06 13:25:52 -04:00
Robin Hu
fa89918faf Removed trailing commas in interactiveLayer code. Caused javascript error/warning. 2013-07-06 12:47:03 -04:00
Robin Hu
28d708d09d Adding unit test on lineChartTest.html for when points are NaN, undefined,
etc.
Found a few edge cases where errors happen. Creating nv.utils.NaNtoZero()
function, to be used in places where points and lines are rendered.

Using NantoZero in scatter.js and interactiveGuideline.
2013-07-05 16:14:48 -04:00
Robin Hu
02da71c944 Added six more important line chart test cases. Changed tests to include
area charts.
2013-07-04 17:45:42 -04:00
Robin Hu
defaf765e8 Created nv.interactiveBisect utility function, and integrated it into the
interactiveGuideline logic.  This function is used to find the x point
position given a mouseX location. It's a more robust solution. Made sure
chart tests passed.
2013-07-04 12:21:12 -04:00
Robin Hu
27d80457b9 Developed stronger backward compatibility with the old tooltip format. Old
tooltips work by default, but if you enable 'useInteractiveGuideline', the
new stuff will show.
2013-07-03 23:17:08 -04:00
Robin Hu
0b3ef24e0b Added test page for lineChart. Continued work on making the interactive line layer. 2013-07-03 13:43:32 -04:00
Robin Hu
dbe826943f Added interactiveLayer.js and integrated this utility into lineChart.js. 2013-07-03 10:33:48 -04:00