gwatts / jquery.sparkline

A plugin for the jQuery javascript library to generate small sparkline charts directly in the browser
http://omnipotent.net/jquery.sparkline/
1.24k stars 278 forks source link

Tooltip is not displayed time format H:i:s in well format? #122

Open varsadadj opened 10 years ago

varsadadj commented 10 years ago

Not Well formatted time in tooltip

A Tooltip is divided time format in three part 00,00 and 80

var values = ['00:00:80','00:00:60','00:00:00','00:00:40','00:01:80','00:02:80'];

// Draw a sparkline for the #sparkline element
$('.sparkline').sparkline(values, {
    type: "bar",
    height: '150px',
    // Map the offset in the list of values to a name to use in the tooltip
    tooltipFormat: $.spformat('{{offset:offset}} {{value}}'),
    tooltipValueLookups: {
        'offset': {
            0: 'unit001',
            1: 'unit002',
            2: 'unit003',
            3: 'unit004',
            4: 'unit005',
            5: 'unit006',
        }
    },
});