score:5
Accepted answer
I am not sure I fully understand your question, if you want to remove the ending x-axis ticks, you should set
d3js V3
.outerTickSize(0),
d3js V4 - V6
tickSizeOuter(0)
If you want to customize the ending ticks, you may use
.tickValues(y.ticks(5).concat( y.domain() ));
Have a look at my JSFiddle for a demonstration.
Source: stackoverflow.com
Related Query
- How to render end ticks always using d3 svg axis
- How to add svg rectangles as background behind axis tick labels in d3js if ticks are inside chart
- How to render svg in backend and save to local using in node js using d3?
- How to get the axis ticks of Plotly's scatter plot to be shown in Latex using Python? --- [Python, Plotly, Latex Representation]
- How to place a date in a tooltip when only part of axis ticks with dates are shown? Using D3.js
- How to add an image to an svg container using D3.js
- How to update axis using d3.js
- How do I get the width of an svg element using d3js?
- How can I get the D3.js axis ticks and positions as an array?
- D3 - using strings for axis ticks
- How to drag an svg group using d3.js drag behavior?
- Multiline svg text axis ticks in d3
- How to force a specific amount of y axis ticks in d3 charts?
- How to draw a exponential function y=ab^x using d3.js axis functionality
- How to show a tooltip with value when mouseover a svg line graph using d3.js?
- Ticks only at the start and end of an axis
- How to get reference to SVG (child) elements nested in another SVG element (parent) using D3?
- How to set fixed no. of ticks on axis in d3.js?
- Renderer2 does not render SVG element while using d3 js - Angular 4
- How to set circle at the right end of the last bar / item using D3
- How to add filled sections to SVG circles using d3.js
- How to output SVG in a Jupyter notebook using jsdom, D3 and IJavascript
- How do I create a minimap of an SVG using D3 v5 and show the current viewport dimensions?
- How do I save an svg node to a file using nodejs?
- How to create a flow layout in SVG using D3.js?
- How to get axis ticks out of d3 without rendering in SVG?
- How to select and deselect a svg line and change its color on selection and deselection using d3.js and javascript , jquery?
- How to add on-click events to D3 axis ticks
- How to append an svg to an prexisting svg using d3.js?
- How to create responsive svg using d3.js
More Query from same tag
- How to format numbers in legend after it has been safely used to define the legend
- D3 how do you center an element with pan/zoom enabled?
- Add feature type to path tag as an attribute in D3
- D3: Issue while Displaying a Line chart inside tooltip
- Closing path for transition animation d3.js
- D3 force-directed graph nodes have no attribute "weight"
- How do I get the column following a particular column?
- D3js collapsible tree entering transition using depth first style
- How to add intervals in the X axis using d3.js?
- SVG to PNG Server side - using node.js
- d3 - improper y axis tick marks
- Bounded force graph with labels d3.js
- darken rect/circle on mouseover in d3
- How to create bubble charts using NVD3
- How to properly rotate text labels in a D3 sunburst diagram
- adding tooltips to pie chart using d3.js
- Recursively build hierarchical JSON tree?
- d3.js filter from csv file using multiple columns
- d3.js difference chart area transitions
- Get constant interval of ticks value in d3.scaleTime()
- How can I incorporate this JQuery to my D3 force layout?
- Invalid value for <circle> attribute cx="NaN" using NVD3.js
- javascript / d3 - passing parameters to a function
- Utilize two objects for a single topojson merge. Multiple datum in d3.select("svg")
- Getting smooth animations in Line Chart D3
- Adding elements from subarrays d3.js
- How to make Vertical corners on a Bar Chart?
- d3.symbols being cut off by ClipPath area
- Two 'calls' to drag events in d3
- Using SVG attributes in variables in d3