Commit Graph

76 Commits (d3467a8838e6ebf5e508314c8acdca701a461a95)

Author SHA1 Message Date
frank shao d3467a8838 Fixed non-matching changestate length in linechart 11 years ago
Robin Hu ef96592694 Updating tooltip highlight so that the item will only highlight if the
mouse is really close to the chart point. Created a "nearestValueIndex"
function.
11 years ago
Robin Hu 8c43e72bbe Added feature where tooltips will highlight the row corresponding to the point your mouse is closest to. 11 years ago
Robin Hu 0edc568ad0 Checking in a solution to making it possible to use
chart.options({}).  Instead of chaining properties,
you can pass chart properties in a hash.
Adding a optionsFunc template to utils.js, so it can reused in all chart
code.
11 years ago
Robin Hu 7adc37f1f8 Removed transitionDuration from line.js and axis.js, and modified
lineChart.js to pass transition in via inheritance.
11 years ago
Robin Hu 1a86e271c1 The <rect> inside lineChart and stackedAreaChart needs to have its
width/height updated on redraw, so the new tooltips can be interacted
with.
11 years ago
Robin Hu 9fbe68c8d8 Adding "use strict"; in all chart code.
Fixed any exceptions thrown when "use strict" was added.
11 years ago
Robin Hu d57fa841ca Added transitioDuration property to stackedAreaChart, lineChart, cumulativeLineChart. 11 years ago
Robin Hu 178700c896 Adding transitionDuration property to line.js 11 years ago
Robin Hu 73a59f6a07 Converting cumulativeLineChart to use legend stateChange dispatch.
Updated lineChart and stackedArea to update chart.state
whenever legend.stateChange is dispatched.
11 years ago
Robin Hu 4e861eaba0 One of my projects is to overhaul the code for nv.models.legend.
Right now, we have duplicated code in all of our charts
for handling legendClick and legendDblClick. It turns out we
can handle this all in legend.js, and reduce the amount of
code in each chart model.

So far, I've converted lineChart.js to this new format.
11 years ago
Rusty Bailey fa43a8388d Add xRange and yRange methods to compliment {x,y}Domain methods. 11 years ago
Robin Hu 799b06254c To make the interactive layer work on Chrome, need
to put a transparent <rect> behind every chart.
11 years ago
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.
11 years ago
Robin Hu 874e068d9f The code to create the interactive guideline is now placed after
the code that creates the legend.
This fixes an issue where the guideline would extend past
the X-axis, when the legend was more than two lines.
11 years ago
Robin Hu 6e84a6845c Tooltips are no longer rendered on document.body.
Instead, they are rendered inside the chart container.
Added some CSS styles to nvtooltip
11 years ago
Robin Hu 4b8ad322cf Updating algorithm for calculating the tooltip offset positioning. 11 years ago
Robin Hu 65edf27199 Fixed bug in nv.interactiveBisect, for situations where the xAccessor is
function(d,i) { return i}
11 years ago
Robin Hu 817340cff5 Instead of using a dispatch for handling 'highlightPoint' and 'clearHighlights', I am making
those functions a direct method of nv.models.scatter.  So you just say scatter.highlightPoint,
instead of scatter.dispatch.highlightPoint.
11 years ago
Robin Hu b07d1f2a87 Added back the 'tooltips' boolean flag to lineChart.dispatch.tooltipShow.
REbuilt nv.d3.js and minified version.
11 years ago
Robin Hu 1eb01d703d Turning off Voronoi point path creation, if using the new interactive
guideline and tooltip.

Turns out, Voronoi is not needed in this new interactive mode!
11 years ago
Robin Hu d974556d05 Cleaned up interactive guideline dispatch code.
Integrated interactive guideline into cumulativeLineChart and updated
example.
11 years ago
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.
11 years ago
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.
11 years ago
Robin Hu 0b3ef24e0b Added test page for lineChart. Continued work on making the interactive line layer. 11 years ago
Robin Hu dbe826943f Added interactiveLayer.js and integrated this utility into lineChart.js. 11 years ago
Robin Hu c079f3e122 Added 'ClearHighlights' dispatch to scatter.
Created preliminary implementation of mousemove event on lineChart.
11 years ago
Robin Hu 4cbd253c67 Added the 'highlightPoint' dispatch on nv.models.scatter. This dispatch lets the programmer highlight any point on any series.
Currently used in lineChart to highlight points.
11 years ago
Robin Hu dc66846d46 Updated scatter.js so that when you mouseover a path-point, it will return all series information in the mouse event dispatch.
Updated nv.models.tooltip with more features.
Updated styling of the tooltip.
11 years ago
Robin Hu 79fb28f088 Updated nv.models.tooltip to have a custom HTML content generator. The default is to put tooltip inside a <table> tag. 11 years ago
Robin Hu c02705fc18 Created nv.models.tooltip in tooltip.js.
This new model encapsulates most of the tooltip functionality.
11 years ago
Robin Hu 0151cdccab Made it so that double clicking a legend item will cause all other series' to be disabled. 11 years ago
Robin Hu 739b93fecf Adding ability to right align the Y-axis for historical bar and line charts. 11 years ago
Robin Hu 62edb49ab8 Added showXAxis and showYAxis feature to lineChart and historicalBarChart. 11 years ago
Tyler Wolf bd0aab25ca lots of changes 11 years ago
twolfnovus f108de0bd1 Merge branch 'master' of https://github.com/novus/nvd3 into development
Conflicts:
	nv.d3.min.js
11 years ago
Robin Hu d690c17a2b Fixed issue #25. Updated logic in tooltip.js, so that tooltips are not inserted into SVG containers. 11 years ago
Dingo 76b97fde13 all models updated to run examples using d3.v3 11 years ago
Tyler Wolf db144a9290 updated many models for state management 11 years ago
Bob Monteverde a52eddf761 Made state.disabled always set on charts that keep state 11 years ago
Bob Monteverde 4e12985eb5 Made state accessible from chart.state() 12 years ago
Bob Monteverde 6213a74e3b Adding state management to most charts 12 years ago
Tyler Wolf 53687e1454 reverted the lineChart right margin change. My mistake 12 years ago
Tyler Wolf 68e8121721 fixed FF getBBox() issue (UI-19), extended line chart right margin +3px 12 years ago
Bob Monteverde 5ca76561c4 Issue #290 added tick 2 pixels to the default tick padding 12 years ago
Bob Monteverde 3b5e738838 Fixed Issues #161 in the lineChart 12 years ago
Bob Monteverde e020c2716b Added proposed fix for Issue #166 to lineChart and sparklinePlus, I will implement in the other relevant charts later, open to suggestions if someone has cleaner code to do this 12 years ago
Bob Monteverde 869a22c5bf Issue #68 updated cumulativeLineChart model to standard format 12 years ago
Bob Monteverde 0ef2908ffc Issue #68 updated multiBarChart model to standard format 12 years ago
Bob Monteverde d8678f966d Issue #68 updated lineChart model to standard format 12 years ago