2016-05-18 3 views

答えて

0

の下のオプションを:あなたはツールチップをフォーマットすることができtooltipFormat、: スパークラインオプションを持っています。

var sparklineCharts = function(){ 
    $('#my_id').sparkline(currentMonthArray, sparklineSettings); 
    }; 

var sparklineSettings = { 
    type: 'line', 
    width: '100%', 
    height: '50', 
    lineColor: '#1ab394', 
    fillColor: 'transparent', 
    tooltipFormat: '{{y.2}}' 
    }; 
0

チェックアウト解決策を見つけた "インタラクティブスパークライン" http://omnipotent.net/jquery.sparkline/#s-docs

$(element).sparkline(scope.values, { 
    type: 'bar', 
    numberFormatter: function(num) { 
     console.log(count++); 
     return '€' + num.toFixed(2); 
    }, 
}); 
関連する問題