Closed dekkofilms closed 6 years ago
Encountering the same thing :( Were you able to find a solution @dekkofilms?
@oksas I don't believe we spent enough time to find a solution, we have since changed frontend frameworks and charting libraries. :/ sorry!
This is an issue with the base project nvd3. It centers the bar charts on the xAxis ticks, which are on the very edges of the chart, so half of the bars on each edge are cut off.
The solution for me was to add the following to the chart options: padData: true
. This is an nvd3 option, & correctly padded the left & right bars so they were not cut off.
I'm just using dummy data right now, and I can't figure out why my bar chart's first bar is being cut off, and the last one being cut off in the midway point. This is my first time using nvd3/d3 and I'm just seeking some advice. I found a few github repos with open issues on this matter, but no strong solution yet.
Here is my code so far, but not much going on really:
And the output is:
JSFiddle here: http://jsfiddle.net/dekkofilms/8ke9ey1t/