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

Bullet Chart - Performance bar can start from center or right #164

Open apbreports opened 8 years ago

apbreports commented 8 years ago

I want the ability to make the Performance Bar start from the center or the right side of the chart.

I can do this like this now like:

Center: return this.target.drawRect( Math.round(this.canvasWidth * 0.5), Math.round(this.canvasHeight * 0.33), perfwidth - 1,

Right: return this.target.drawRect( Math.round(this.canvasWidth), Math.round(this.canvasHeight * 0.33), perfwidth - 1,

It would have been nice if there was a bullet_type paramater to handle this. For now I have created a new Bullet chart: bullet_center Bullet_negative

Live example:

capture5