Grouped Bar Chart with Negative Values

35 views
Skip to first unread message

Chamver

unread,
Oct 15, 2017, 8:32:18 PM10/15/17
to d3-js
I have been trying to create a grouped bar chart with negative values, but I am unable to do so.

I already have some codes written but it would not render properly.

Here is what I have done so far:



And combining that with this template: https://bl.ocks.org/mbostock/3887051

Appreciate the help that I could get thanks!

sandeep edara

unread,
Oct 17, 2017, 12:01:09 PM10/17/17
to d3-js
Hi Cham,

I dont see any issue with the code,
you can increase the inner padding to see the groups clearly.

var x0 = d3
  .scaleBand()
  .rangeRound([0, width])
  .paddingInner(0.5);

Regards,
Sandeep.
Reply all
Reply to author
Forward
0 new messages