score:5
Accepted answer
Thanks to @Mark, I realized that I was looking at the problem from the wrong perspective. It didn't come from d3 but from Typescript. The axisBottom variable is a function, and Typescript requires it to have a context when used as a callback. Binding this solves that problem, as in :
svg.select(".x")
.transition()
.call(x_axis.bind(this));
Source: stackoverflow.com
Related Query
- Syntax for axis transition in svg/d3
- D3 Y Axis Scaling and Path Transition
- How to remove axis path/line during transition in d3js
- d3 v5 axis transition
- Wrapping long labels with axis transition in D3.js v4
- How to transition D3 axis without tick text attribute reset?
- d3 - Axis Label Transition
- Remove d3 axis transition on initialization
- D3 axis label rotate transition not smooth
- Update axis style in transition
- How to tweak d3 axis attributes when transition is present?
- How to transition area along one axis in D3.js
- Transition on axis with appended text
- Transition of an axis
- Transition on axis -- losing grid lines (ticksize), how to transition in correct order?
- d3 axis labeling
- Invoke a callback at the end of a transition
- rotate x axis text in d3
- How to update axis using d3.js
- Remove end-ticks from D3.js axis
- d3.js: Align text labels between ticks on the axis
- dealing with dates on d3.js axis
- D3.js: Using images (with filenames specified in data) as tick values on axis
- Create a D3 axis without tick labels
- How can I get the D3.js axis ticks and positions as an array?
- d3.js axis labels - color not changing
- Sankey diagram transition
- D3: Is it possible to zoom+pan one axis and only pan the other?
- D3 - using strings for axis ticks
- Change and transition dataset in chord diagram with D3
More Query from same tag
- Is it possible to have multiple parent/root nodes in a D3 Icicle plot?
- Fetching data from json on node click
- d3.js pan restricted behaviour
- How do I reformat the data in d3 having values to the key and another values to the value of the key?
- embedding json in sankey d3 javascript file
- D3plus is not defined
- Scattered plot zooming not working correctly in d3.js
- storing dc.js filters in URI and restoring them
- Simple Graph chart in D3
- Implementing d3.js in angular 4
- d3 force layout: highlight nodes in a group and their neighours
- value not showingcorrectly on hover in d3-sankey
- Dimple JS - Removing gap between the y-axis and the chart
- SVG text is poor quality?
- How to have d3 tickFormat of (day, time) but only show time if day is the same?
- Multiple canvas layers and mousemove
- How to convert DataFrame into nested JSON
- Uncaught TypeError: Object #<SVGAnimatedString> has no method 'indexOf' in d3.js and jquery UI mobile when trying to show a popup
- How to get color of current selected object using d3
- Sizing of SVG foreignObject element to fit HTML element
- Angular2-Seed + Typings + D3: Import error, 'Cannot find module 'd3''
- Add text label to d3 node in Force layout
- NVD3 legend Show/Hide chart getting scale / zoom feature disabling
- d3.js filtering with checkboxes
- How to load a d3-dependent script using RequireJS?
- Plotting points using d3.geo.tile
- How to update all existing elements in the same level with same parent value?
- Removing a node in d3 grapth on node.js
- Equivalent of jQuery's 'not' selector in D3.js?
- JavaScript/D3: The "same" function call yields different result?