We have a graph that when all data is zero, shows the zero dollar value in the middle of the y-axis, and a few negative values below. It would be better to have the zero at the bottom, with dollar values up the side.
Here's the graph code:
nv.addGraph(function() {
var chart = nv.models.multiBarChart()
.transitionDuration(350)
.reduceXTicks(false)
.rotateLabels(0)
.showControls(false) //Allow user to switch between 'Grouped' and 'Stacked' mode.
.groupSpacing(0.1)
.tooltipContent(function (key, y, e, graph) {
return '<p> Total Cost: $' + graph.value + '</p>';
})
;
chart.xAxis
.tickFormat(function(d) { return d3.time.format('%b, %y')(new Date(d)); });
chart.yAxis
.tickFormat(function(d) { return '$' + d3.format(',f')(d) });
d3.select('#hardware_costs_graph svg')
.datum(exampleData())
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
How can the baseline be changed so that no negative values show?