public class Prefix
extends com.google.gwt.core.client.JavaScriptObject
D3#formatPrefix()
Example:
var prefix = d3.formatPrefix(1.21e9);
console.log(prefix.symbol);
console.log(prefix.scale(1.21e9)); // 1.21
Modifier | Constructor and Description |
---|---|
protected |
Prefix() |
Modifier and Type | Method and Description |
---|---|
double |
scale(double input)
Convert the number to the appropriate prefixed scale.
|
String |
symbol()
Returns the prefix symbol, such as "M" for millions.
|
public final String symbol()
public final double scale(double input)
input
- the number to convertCopyright © 2015 gwt-d3. All rights reserved.