d3-bullet v4
d3 v4 port of https://github.com/d3/d3-plugins/tree/master/bullet
Installing
npm install d3v4-bullet
.
API Reference
# d3.bullet()
Constructs a new default bullet generator.
# bullet(data)
For example:
var chart = d3 widthwidth heightheight; var svg = d3 datadata ; var data = "title":"Revenue""subtitle":"US$, in thousands""ranges":150225300"measures":220270"markers":250 "title":"Profit""subtitle":"%""ranges":202530"measures":2123"markers":26 "title":"Order Size""subtitle":"US$, average""ranges":350500600"measures":100320"markers":550 "title":"New Customers""subtitle":"count""ranges":140020002500"measures":10001650"markers":2100 "title":"Satisfaction""subtitle":"out of 5""ranges":354255"measures":3247"markers":44
# bullet.width([width])
If width is specified, sets the width and returns this bullet generator. If width is not specified, returns the current width, which defaults to: 300
# bullet.height([height])
If width is specified, sets the width and returns this bullet generator. If width is not specified, returns the current width, which defaults to: 30