They have focused on implementing standard chart designs (line graphs, bar graphs, scatterplots), but implemented in flexible, interactive ways.
They have used the same data structure requirement for all the graphs:
The main data array contains multiple data series, each of which represents a logical grouping of the data;
Each series is an array of individual data objects containing two or more variables.
All the graphs have a similar style and reuse important pieces of code.
The NVD3 library allows you to create a grouped bar chart or a stacked bar chart, and even a chart that interactively animates between the two.
Adapting that chart to create a stacked and grouped bar chart is not a simple task, in part because the data structure would be different. You would need a three-level data structure (
series > sub-series > datapoints, representing
groups > stacks > bars) instead of the two-level (
series > datapoints) structure used by NVD3.
I strongly recommend, if you want to use d3, start with the basics in the tutorials list or one of the introductory books. However, you'll also want to check out the gallery of examples, and from there you'll find the following charts that will be of particular interest:
- Mike Bostock's Stacked Bar Chart
- Bostock's Grouped Bar Chart of the same data
- Ali Gencay's adaptation of those examples to create a stacked, grouped bar chart
Once you have become familiar with building charts in d3, you may want to open up the NVD3 source code to see if you can borrow some of their reusable code components (being sure to respect their licence terms, of course). However, I would not recommend doing so as a beginner -- it is a lot of code, and uses a lot of complex techniques to put all the pieces together.
- NVD3.js: Stacked and grouped bar chart with two y-axis
- Horizontal Stacked Bar Chart with Two Y Axis Issues
- dc.js Stacked Bar Chart having only one column and with elastic X Axis is not rendered properly
- d3.js stacked bar chart with positive and negative values
- Grouped bar chart with zoom and updateable data error
- How to line up x axis on stacked bar chart with a line overlay in d3.js
- d3 bar chart with fixed bar width and fixed spacing to align in center axis line
- d3 stacked to grouped bar chart date axis
- D3 Bar and Linear Chart With Multiple Axis
- d3 bar chart with custom x axis and bar width
- Using d3-tip and CSS hover effect with d3 stacked bar chart
- NVD3 Line Plus Bar With Focus Chart only displaying half width of first and last bar
- d3.js, grouped bar chart with two Y axes, series related to Y1 or Y2
- Show values on Y Axis as it is with Higher and lower limits NVD3 Line Chart
- How can I create a basic bar chart with unique counts on the y axis and a category on the x axis?
- dc.js ordinal stacked barchart with two dimensions, getting NaN values and no stacked bar is displayed
- d3.js horizontal stacked bar chart with 2 vertical axes and tooltips
- X axis label not displayed in bar chart with scroll and zoom feature - d3js, Brushing
- Right Axis not displaying on Dual Axis Grouped Bar and Line Chart D3
- Issues with x and y axis of a bar chart with d3
- C3 js grouped bar chart scolling and fixing y axis issue
- NVD3 Multi Bar Chart - Add in grid lines and make sure every y axis value shows up
- Display Pie chart, Grouped and Stacked bar chart in one page
- Make simple bar chart using C3 with separate columns on the x axis
- nvd3.js-Line Chart with View Finder: rotate axis labels and show line values when mouse over
- d3 bar chart y axis ticks and grid lines above max value
- Adding Error Bars to Grouped Bar Chart with D3.js
- How to use x and width in a bar chart with scaleTime?
- How to add space between bars in a grouped bar chart in a nvd3 grouped multibar chart?
More Query from same tag
- D3 chart angular directive not rendering
- D3 scatter plot transform symbols
- .style of child nodes in d3js
- Simple D3js code not working
- Drawing a fixed-length circle in D3.js
- dc.js - multiple lineChart based on separate categories in single csv file
- Leaflet + D3 - No mouseover on Safari
- Highlight specific link in D3.JS sankey diagram
- Major and minor ticks with different style, whole page covered D3?
- d3.js flare.json using my created Json w/ collapsible tree
- NV.D3 Cannot read property 'length' of undefined
- Using public variables and interfaces in external libraries when using Typescript
- Access parent data when appending
- Why are only 3 paragraphs appended?
- D3 axis scaleTime format React
- dc.js not displaying the y-axis
- d3js - calculate distance between two data point in line graph
- Forcing Links to Draw Under Nodes
- visualizing a mapping in d3js- model to be used
- Select all instance of a word in a rendered webpage
- Propagate Data from Parent to Child Selection (D3)
- How to Create/Show Multiple Iterations of Charts with the same data in One Area with Buttons using D3.js
- Why does d3 date axis fail in Firefox for some particular date domains?
- Bar chart: how could I align the data with countries when sorting in D3 v5?
- Why are these Cubism horizon charts squished to the left?
- D3.js Tooltip with filled area graph
- First row in D3 DataTable is sorted incorrectly - D3/DC/Crossfilter
- Making slider work on horizontal bar chart using D3
- Unable to export D3 chart Properly