score:1
In D3 we normally call axis
the variable referring to the axis generator, not to the group that contains it. Other than that, this is indeed the most common way to call the axis:
var gX = chart.append("g")
.attr("class", "axis")
.attr("transform", "translate(" + 140 + "," + 450 + ")")
.call(d3.axisBottom(x));
Here is your updated fiddle: http://jsfiddle.net/5yqkz1z5/
PS: change the magic numbers in the translate function accordingly.
Source: stackoverflow.com
Related Query
- d3v4 timeline adding a date axis to the bottom?
- D3: How to remove tick marks at the top and bottom of Y axis
- Adding a tooltip over different axis where the line goes through in d3
- show the bottom most tick of y axis
- Adding axis to the dynamic line chart in d3
- d3 chart is showing some decimal value in the X axis tick, instead of showing the date and time
- C3: Adding y2 axis on the fly
- How to move the x axis to the bottom of a svg
- d3.js - adding One additional tick for the Y axis does not work
- How can I make a bar chart starting from the 0 point of the y axis and not from the bottom of the svg?
- d3v4 scatterplot - fixing the domain adding animations
- adding height or padding to d3 bottom axis
- D3.js - Adding a tick value on the x axis (date format)
- Adding an auto brush to the d3 timeline chart
- Updated: changing the graph based on the slider date on x axis
- How can I convert the unix date values along the axis of a d3.js graph to format dd-mm-yy?
- I am trying to visualize my json object with D3. I want date to be the x axis and y to be sales. number values stored a string
- d3.js: Align text labels between ticks on the axis
- What does the "System" category of records mean in Chrome Timeline profiling tool?
- How can I get the D3.js axis ticks and positions as an array?
- D3: Is it possible to zoom+pan one axis and only pan the other?
- D3 grouped bar chart: How to rotate the text of x axis ticks?
- how to set the domain and scale on an axis on a nvd3.js multiBarChart
- D3.js: Pie graph, adding a border only to the outter region
- Make simple bar chart using C3 with separate columns on the x axis
- Adding text to the center of a D3 Donut Graph
- Adding a specific tick to a D3.js axis
- How to display the value for the final tick on axis in D3?
- Looking for a better way to alter the color of axis components in d3.js v4
- Draw a vertical line representing the current date in d3 gantt chart
More Query from same tag
- D3.js selection does not have enter or exit
- D3.js map that automatically updates from google form’s answer sheet
- How to prevent bubbles from touching the svg frame/border when using D3.js force?
- Blank screen with d3js
- Hebrew (and Arabic) text in SVG and Chrome workaround?
- Updating x axis d3js
- Why do we need force.on('tick'.. in d3
- Remove black SVG fill in C3.js time-series chart
- D3 key function param undefined
- d3 - nested selections/sub-item update issue
- shp2json produces GeoJSON with bounding and coordinates not in (-180,180) range
- d3.map() issue with retrieving data
- Javascript Map Won't Return Array Value, for D3.js Chart
- Append a text on the node PIXI.js
- ZoomIn and ZoomOut doesn't zoom from center with slider
- Resizable and Rotatable Rectangle D3?
- Parse flat array into a nested structure (tree)
- d3.js updating a pie chart
- Shorthand property assignments are valid only in destructuring patterns - svelte
- Data join in a line chart
- reading data from Ruby in D3 (JSON)
- Why does it need two clicks in D3.js for my click event to fire?
- How to append an svg loaded by d3.xml into an svg
- dc.js apply some, but not all chart selections to numberDisplay, while maintaining the interactions between charts in place
- Leaflet map inside gridster item?
- Changing text attribute based upon event handler in d3.js
- Uncaught TypeError: Object #<SVGAnimatedString> has no method 'indexOf' in d3.js and jquery UI mobile when trying to show a popup
- D3 Treemap reset color
- Create a Graduated Symbol Map using D3
- Responsive SVG not working correctly?