styleFontFamily
Set default font family
Specification
Default implementation: { styleFontFamily : arial }
Key
Name | Alias | Category |
styleFontFamily | style__font__family | Style |
Value
Allow "arial", "times" and "helvetica" as value
Default | Validation | Type |
"arial" | ^(?:arial|times|helvetica) | String |
Example A.
Set default font family to: georgia
Output
Open output in a blank window. Download examples as zip.
Parameters
This dataset shows the mobile google pagerank performance score for a certain website.
Value | Type | |
---|---|---|
Source | "../data/performance.json" | String |
X | "name" | String |
Y | [ "mobile" ] | Array |
Options | { "styleFontFamily" : "georgia" } | Object |
Source Code
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontFamily" : "georgia" }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>d3.statosio - styleFontFamily</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/6.2.0/d3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/statosio/0.9/statosio.js"></script>
</head>
<body>
<script>
d3.json( "../data/performance.json" )
.then( ( file ) => {
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontFamily" : "georgia" }
)
} )
</script>
</body>
Example B.
Set default font family to: verdana
Output
Open output in a blank window. Download examples as zip.
Parameters
This dataset shows the mobile google pagerank performance score for a certain website.
Value | Type | |
---|---|---|
Source | "../data/performance.json" | String |
X | "name" | String |
Y | [ "mobile" ] | Array |
Options | { "styleFontFamily" : "verdana" } | Object |
Source Code
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontFamily" : "verdana" }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>d3.statosio - styleFontFamily</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/6.2.0/d3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/statosio/0.9/statosio.js"></script>
</head>
<body>
<script>
d3.json( "../data/performance.json" )
.then( ( file ) => {
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontFamily" : "verdana" }
)
} )
</script>
</body>