Avoid to show tooltip in barspacing of sparkline bar chart

47 views
Skip to first unread message

Manjay Dasaundhi

unread,
Sep 21, 2016, 3:58:18 AM9/21/16
to jQuery Sparkline

  I have created space between bar graphs. But I want to show tooltip only on bar not in blank space.

var values = [100.00,100.00,100.00,80.00,80.00,66.67];

// Draw a sparkline for the #sparkline element
$('#sparkline').sparkline(values, {
    type: "bar",
    // Map the offset in the list of values to a name to use in the tooltip
    tooltipFormat: '{{offset:offset}} {{value}}',
    barSpacing: '50px',
    tooltipValueLookups: {
        'offset': {
            0: 'Jul',
            1: 'Aug',
            2: 'Sep',
            3: 'Oct',
            4: 'Nov',
            5: 'Dev',
        }
    },
})

The jsfiddle - http://jsfiddle.net/RsbHC/396/

Reply all
Reply to author
Forward
0 new messages