QlikDev/D3SlopeGraph — pull request #1 by hdonald (2014-06-14 17:00:18+00:00)
Title: Variation with Sparkline in tooltip

Hi Stefan, thanks for creating this extension, I’ve found it very useful.

In using it I made a couple of minor changes you might be interested in –

One less expression:
Instead of having two expressions only one is used in the properties. The min and max values are calculated in the javascript for display as labels Left and Right.

Sparkline as trend in Tooltips:
An extra Dimension has been added to bring in data at a more detailed level that can be summarized in D3 for the main chart and selected in the tooltip for display as a Sparkline.

Tufte’s original postings on SlopeGraphs mentioned using sparklines to show the detail behind a trend but I’ve never come across an implementation that did so.
Using a mini chart in D3 seemed a quick way of seeing what that effect looked like but I’m not making any claims for this solution being particularly efficient so perhaps you, or other contributors, can find a better way of doing this.

The D3 sparkline used is based on the D3 gallery example and a short tutorial at http://www.tnoda.com/blog/2013-12-19

Apologies for any errors in using Git as it’s new to me, having only used Gists for storing code samples previously,

Regards,

HD.