Open y01689 opened 6 years ago
my method now is below , is there a better solution ?
` var myvalues = [[10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11]]; //var myvalues = [10,4,5,9,4,7,1] // $('.dynamicsparkline').sparkline(myvalues);
/* The second argument gives options such as chart type */ $('.dynamicbar').sparkline(myvalues, { type: 'bar', lineColor:false, barColor: 'green', stackedBarColor:['green','green'], tooltipFormatter: function(value){ console.log(value) return Math.abs(value); } } );`
my method now is below , is there a better solution ?
` var myvalues = [[10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11], [10,-10],[8,-8],[7,-7],[4,-4],[1,-1],[6,-6],[11,-11]]; //var myvalues = [10,4,5,9,4,7,1] // $('.dynamicsparkline').sparkline(myvalues);