score:33
Accepted answer
declare formatter
formatvalue = d3.format(".2s");
use inside tickformat
.tickformat(function(d) { return formatvalue(d)});
to replace m with million try this..
.tickformat(function(d) { return formatvalue(d).replace('m', 'million'); });
Source: stackoverflow.com
Related Query
- Format Y axis values, original figures in millions, only want to show first three digits
- Best way to show Y axis values in Millions of £
- Want to show unique values only using d3.js not working
- D3 - axis only show values from 0-1
- Display only whole values along y axis in d3.js when range is 0-1 or 0-2
- nvd3.js-Line Chart with View Finder: rotate axis labels and show line values when mouse over
- How to format the Y axis values on Rickshaw Graphs
- Display only values from the data set into X axis ticks
- D3.js - show tick values on the Y axis
- D3 - Show only middle and last tick marks on axis
- D3.JS trying to format the text in first tick of axis
- d3 - Show only values using d3.nest()
- Maintain highest and lowest values only in Y axis of d3.js Bar graph
- how to use d3 .ticks to show original y-axis values in bar chart
- Only show first 25 data items in bar chart with d3.js
- Show only max values in d3 bar chart
- D3 show values as label on right axis
- How to show labels in first two rings only in a zoomable sunburst partition with rotated labels?
- Show values on Y Axis as it is with Higher and lower limits NVD3 Line Chart
- D3.js line chart, x axis have arbitrary dates, but want to show them sequental
- Format of tick values on axis
- d3.js - Tooltips only shows the first properties values of the data object
- dc.js graph won't show line and y axis values
- D3.JS- Format tick values with an ordinal scale axis
- where to modify x axis length. AKA I want to show future years in chart
- d3 axis is not showing any values if there is only 1 value in the domain
- 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: Using images (with filenames specified in data) as tick values on axis
- D3: Is it possible to zoom+pan one axis and only pan the other?
More Query from same tag
- d3 RadarChart: load json data
- global variable not updated when using namespace in javascript d3.js
- anti aliasing issue with the width of SVG element path
- Mouse up event not firing with d3.js
- loading d3.csv of 3.8 MB file fails on some systems
- modifying d3's force layout "annealling" schedule
- D3 Mouse Over Groups Issue
- JavaScript - D3 force layout highlight subtree
- d3 - how to add color to path object
- Data manipulation : How can I append path from my data array?
- D3 creating a table
- D3 datamaps datastructure (multiple years, all countries)
- Loop only through nested elements of the array item from D3 selectAll creation from data()
- Access parent attribute in d3.js to set attribute of child
- D3 selection returns empty list; elements exist in DOM
- how to put bird counts data in d3.js to draw bar-chart on google map
- d3.js hierarchical edge bundling: embed json data in variable
- Bootstrap popover on svg element repositions itself incorrectly when page is scrolled
- d3 line and points on map from csv data
- How to read D3 node label text into a div/paragraph element?
- Why are the .selectAll() D3-created circles in my SVG said to be 1 element using .length?
- D3 interactive graph - Update graph with new data from server
- Draw a map with d3 and topojson
- Trying multiple approaches to make the node size of a force directed graph proportional to it's degree
- Create hashtable/dictionary from csv data
- is the d3.js api object structure always the same
- SVG path doesn't seem to orientate itself correctly
- CSS-Sprites + D3.js
- Calling a javascript function for slider text
- Backbone JS fire event upon rendering template