novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.14k forks source link

bullet chart domain needs to be extended #1352

Open rwijtvliet opened 9 years ago

rwijtvliet commented 9 years ago

The scale of the bullet chart goes haywire when a marker is inserted that is larger than the maximum value specified for the ranges. Therefore, in nv.d3.js (nv.models.bullet = function(){...}), the array in

// Setup Scales
// Compute the new x-scale.
var x1 = d3.scale.linear()
    .domain( d3.extent(d3.merge([forceX, rangez])))
    ...

should be changed to include the specified marker values:

// Setup Scales
// Compute the new x-scale.
var x1 = d3.scale.linear()
    .domain( d3.extent(d3.merge([forceX, rangez, markerz])))
liquidpele commented 9 years ago

Please send a pull request :)