score:0
Here's what I did different to your code.
Changed nv.models.multiChart()
to nv.models.multiBarChart()
Updated chart
to include :
.showControls(false)
.stacked(true);
Replaced the chart properties to the following :
chart.xAxis.tickFormat(d3.format(',f'));
chart.yAxis.tickFormat(d3.format(',.1f'));
//chart.xAxis.tickFormat(d3.format(',f'));
//chart.yAxis.tickFormat(d3.format(',.1f'));
//chart.yAxis2.tickFormat(d3.format(',.1f'));
//chart.bars1.stacked(true);
//chart.bars2.stacked(true);
//chart.bars1.groupSpacing(0.5);
//chart.bars2.groupSpacing(0.5);
You can find a working version of your code here
Hope it helps.
Source: stackoverflow.com
Related Query
- Fix overlap on multiple stacked barchart
- NVD3 Multiple Axis Barchart Overlapping Bars on Drawing
- D3v4 Stacked Barchart Tooltip
- How to create Stacked Line Chart D3, Multiple Y Axis and common X Axis
- How to create a stacked barchart using d3?
- dc.js: stacked barchart cant display
- d3.js stacked barchart not drawing along x axis?
- How to prepare data for d3 stacked barchart using rollup
- How to fix a display issue in a multiple line graph. The svg.append("path") is not displaying anything
- Stacked bar plot with multiple data and respective data points as legend
- Grouped multiple stacked bar chart
- dc.js coloring a stacked barChart
- D3js Stacked Barchart width is not propper
- D3 adding text lables to horizontal stacked barchart
- dc.js ordinal stacked barchart with two dimensions, getting NaN values and no stacked bar is displayed
- Text not updating in stacked barchart d3js v4
- How to display data value on every layout of stacked barchart in d3
- D3.js - Stacked Barchart from JSON?
- Avoid D3js circles overlap within multiple clusters and increasing node radius in D3 v5
- D3 toggle stacked to grouped on multiple bar charts
- How to fix a multiple brush chart in d3
- D3 Stacked Bar Chart: Bars Overlap
- Fix Piechart label overlap using C3/D3
- D3 Horizontal grouped stacked chart bars overlap for a small number of values
- d3js Multiple Stacked Bar Chart Line Cursor Appearing in Wrong Chart
- NVD3 - Adding and resizing multiple vertical lines to stacked area chart
- Aligning a stacked barchart to the bottom of the chart
- D3 adding dots to multiple stacked line charts
- d3 js linear scale bar position and height in stacked to multiple charts
- D3.js stacked bar chart with multiple levels?
More Query from same tag
- Iterative/chained transitions along line graph with discrete points and delay
- Calculate string size without render
- Seven ate nine: Why is my index 8 being skipped in this d3 selection?
- Change the ticks on x-axis
- Unable to display the tooltip and arctween transition ata a time in d3 pie chart
- Change color of button while filtering data
- Attempting to implement a svg:clipPath but end up with almost a blank screen
- How can I style a tooltip for an NVD3 Chart?
- D3 v4 Scatterplot chart data points are not updating on zoom
- How can I connect two parent node into one child node and how to make a tooltip for each node in the tree pragmatically? in D3 js (SVG)
- Get value property of each element in d3 selection
- How to remove the first tick in d3
- Dynamically edit value
- Loading my simple D3 project in chrome gives me this error. "Failed to load resource: net::ERR_NAME_NOT_RESOLVED". What can I do to fix it?
- giving axis ticks more space in nvd3
- d3 rollup on each csv columns
- d3.js multiseries line chart tooltip issue
- d3: Adding links to nodes in hierarchical edge bundling
- D3.js - Conditional apply nest.key() function to array elements
- Looking for a way to display labels on sunburst chart (could not find a working example)
- D3.js : Adding 2nd class as an attribute for 2nd interactivity
- How to get JSON key for d3.js chart
- How to add non-overlapping polylines and text labels to 3D pie chart using d3.js?
- Remove or clear previously drawn dimple chart
- how to add text to cells in d3.grid example d3-js-building-a-grid-of-rectangles
- javascript d3.js: initialize brush with brush.extent and stop data from spilling over margin
- Canceling Mouseover on Newly Created DOM elements in D3
- How to use d3.js in JSP?
- Updating data values with HTML input and changing the data array
- make a title for <image> of SVG