score:1
Accepted answer
The bar chart does not update because updateBarChart function is in the scope of d3.json("d1.json", function(datasetBarChart){}
.
function up(d, i) {
updateBarChart(d.data.category, color(i));
updateLineChart(d.data.category, color(i));
}
To work around this, make the call for data and pass it to the render functions.
Updated plunker: https://plnkr.co/edit/L18QvDQ2FFvM29wJkx4i?p=preview
Source: stackoverflow.com
Related Query
- D3 Dashboard chart not working properly
- Slice and bounce effect not working properly in pie chart
- d3.js Bar Chart transitions not working properly
- D3 bar chart not working properly with all negative and positive values
- viewbox with pixel value to make d3 chart resposive is not working properly
- Pie chart interpolate not working properly
- C3 bar chart width is not working properly
- d3.js - mouseover event not working properly on svg group
- Exit not working properly
- Angular ng-click's inside a dynamically created d3 chart are not working
- d3 v4 line chart transition not working
- d3 - mouseover and mouseout event not working properly
- D3's scale not working properly
- area chart with d3 is not rendering on jsp page but working fine with html
- D3.js Pie Chart Dynamic Update Transitions not Working as Expected
- d3 js exit animation not working properly
- D3.js bar chart - axis and labels not working / transitioning
- Horizontal bar chart exit method not working
- Multiple line chart not working with date format
- d3 Bar chart with a tool tip is not working
- d3js - line chart `circle` placement to the lines are not properly sets
- D3js responsive stacked bar chart - other topics solutions not working
- D3 bar chart bar text labels not visible properly
- Looking for a way to display labels on sunburst chart (could not find a working example)
- d3 chart not updating properly
- Pie chart not updating properly when using brush in series chart
- Exit() is not working for d3 group bar chart
- D3 line chart does not show tool tip and data points properly
- d3.js circle plotting does not working properly while trying to load after first time
- D3 Collapsible tree not working properly in angular
More Query from same tag
- Links and Arrowheads to terminate at borders of nodes in D3
- trying to understand javascript code
- How to add visualization to the charts created using d3.js?
- D3.js contour plot not working (Possible bug of d3 contour)
- Making sense of D3 code
- Karma/Jasmine unit test for D3 svg element
- Zoom to arbitrary feature in D3 canvas
- d3.js x3dom: How to freeze camera position and get an axis?
- Loading d3 bullet chart into a span
- extract the count of fields for a month in a year and export it in json for d3.js
- n3 line chart x axis label
- Allow zoom with buttons only, allow pan with mouse drag
- How can I display a placeholder image in my SVG until the real image is loaded?
- How do I resize SVG images on a map as the zoom level changes?
- D3 force collision detection for ellipses
- Adding label to dynamically added edge d3js force layout
- Create JSON from database query rails
- Tooltip issue with a D3 Choropeth Map
- How do you place a map as an interactive background in d3?
- X-axis labels(Date) is not coming properly D3 v4
- Adding Dynamic Node in D3 Tree
- how to draw left and right rectangle sliders over x-axis of d3 graph chart
- d3: multiple tasks responding to one event
- Reading DOT files in javascript/d3
- C3: Adding y2 axis on the fly
- d3 tree layout - force child nodes to use available space
- How do I calculate partial totals in crossfilter?
- d3.js get JSON from url
- ISO 8601 date/time along X-axis with D3
- jsdom.env is not a function exporting svg to image