Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to align the bar vertical center ? #198

Open
y01689 opened this issue Dec 28, 2017 · 0 comments
Open

how to align the bar vertical center ? #198

y01689 opened this issue Dec 28, 2017 · 0 comments

Comments

@y01689
Copy link

y01689 commented Dec 28, 2017

2017-12-28_162942

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); 
        }
    } );`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant