score:1
Accepted answer
The problem was that the "transform", "translate("
in your createAxis()
moved your axis to the side.
So I added
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
To your original svg
variable so that it aligns with the axis and removed the
.attr("transform", "translate(" + 0 + "," + 0 + ")");
From the createAxis()
Here's the link: Plunker
Source: stackoverflow.com
Related Query
- How to create a multiseries line chart using data filtered from a csv file?
- How to extract data from a csv file and create a line chart from it in D3.js
- Using d3.js to create multi-line chart from csv file
- How to update data on a page according to data from a CSV file instead of using fixed element data on the page?
- how to make real time multi line chart using d3 where data is from api in json format
- In d3js, how to plot line chart from csv file, taking data from seperate columns for each row
- How can I program a line chart using D3.js to visualise a data which is received from a server side ?
- How to load data from a CSV file in D3 v5
- how to create labels for data in donut chart using d3.js
- How to update elements of an HTML that the elements are created using data from a CSV file?
- How to plot animated line chart using d3 while the data table is required to be updated every 1 second?
- display data from csv file into BarGraph using d3.js
- How would I import a single column CSV file into a pie chart using Javascript D3?
- How to create d3 graph using data from Rails database
- How to fetch data from json file to draw a dynamic graph by using d3.js
- How to create a % difference arrow line with value in a bar chart using D3.js
- In a d3 scatterplot using data from a csv file, how do i draw lines connecting related points when the mouse is over a point?
- how to display data from 1st point on words on y axis for line chart in d3.js
- How do you get JSON data and create a line chart with d3.js?
- Efficient way of Using D3 to create hierarchical content from a CSV file
- How to create an array of nested objects from a csv file in D3.js?
- how to get data from mongodb and display as a d3 chart using nodejs
- How to make a scatter plot from a CSV file using d3.js?
- D3.JS how to load 3 csv files and change data on line chart with button click event?
- How to create a new array using the data from the old one?
- D3.js multi-series line chart using csv file
- How to create a interactive d3 line chart to show data plots / labels on hover
- D3.js using data from csv file to populate svg map
- how to transpose data from csv file in d3.js
- How to select only x rows from a csv file for a pie chart
More Query from same tag
- D3.js adding a new object with nest and key
- How to visualize mysql data in d3js using django?
- d3pie.js formatted value displaying
- d3 - Round number from nest() and sum()
- d3.js How to create a separate element for each state in a country map?
- How do you graph 24 hour times (e.g., 23:01:35) , as y-values, in rickshaw?
- Use superscript in d3
- d3 change position of pie chart (middle point)
- Generating visually pleasing circle pack
- I'm having trouble getting multiple isotype graphs on one page. I think the problem may be with the svg <use> element .selectAll("use")
- D3 within an AngularJS app
- How to create clickable elements displayed on mouseover?
- How to add an image to an svg container using D3.js
- D3 Paths from external data not appearing
- How to use d3.time.scale() to generate an array of evenly spaced dates?
- Why do white spaces get removed from label name?
- Trying to find a way to get the row and column names of csv in html/js by using d3 , any other ways?
- dc.js simulate click on chart and trigger filter on
- Creating a reversed D3 stack bar chart
- d3 rollup on each csv columns
- Dynamic tickValues on time.scale in D3
- Testing onclick events on SVG with Cypress
- d3.js bar matrix - reset height if different column
- d3 force directed layout - drawing links without changing the location of the nodes
- Making a D3 widget scrollable
- raw-graphs color by column
- d3 ordering column rule based on JSON response
- How to display negative values in a d3 bar chart?
- Break D3 Each Loop Without a flag
- y0 naming convention in d3.js - what are these variables used for? How best to explain it?