The idea with composite sparklines is that you only have one span and draw multiple sparklines onto it. Only the second (and later) calls to the .sparkline() method may set composite=true.
So, for example your span may look like:
<span id="mysparkline">4,3,3,1,4,3,2,2,1</span>
To use the values in the sparkline for a line chart and then draw a bar chart over the top:
$('#mysparkline').sparkline('html', {type: 'line', width: '50px'});
$('#mysparkline').sparkline([1,2,3,4,3,2,4,1,3], {type: 'bar', composite: true});
Or you can pass in both sets of values via sparkline():
<span id="mysparkline">Loading..</span>
$('#mysparkline').sparkline([4,3,3,1,4,3,2,2,1], {type: 'line', width: '50px'});
$('#mysparkline').sparkline([1,2,3,4,3,2,4,1,3], {type: 'bar', composite: true});
Or you can put both sets of values directly on the span tag:
<span id="mysparkline"barvalues="1,2,3,4,3,2,4,1,3" linevalues="4,3,3,1,4,3,2,2,1">Loading..</span>
$('#mysparkline').sparkline('html', {type: 'line', tagValuesAttribute: 'linevalues', width: '50px'});
$('#mysparkline').sparkline('html', {type: 'bar', tagValuesAttribute: 'barvalues', composite: true});
On Sunday, May 13, 2012 12:19:23 AM UTC-7, tommy xri wrote: