styleFontSizeText
Set default font size, including selection.
Specification
Default implementation: { styleFontSizeText : 10 }
Key
Name | Alias | Category |
styleFontSizeText | style__font__size__text | Style |
Value
Allow positive integers beginning from 1 as value.
Default | Validation | Type |
10 | ^[1-9]d*$ | Integer |
Example A.
Set default font size to: 20
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 | "https://docs.statosio.com/data/performance.json" | |
X | "name" | String |
Y | [ "mobile" ] | Array |
Options | { "styleFontSizeText" : 20 } | Object |
Javascript
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontSizeText" : 20 }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>docs.statosio - styleFontSizeText</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( "https://docs.statosio.com/data/performance.json" )
.then( ( file ) => {
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontSizeText" : 20 }
)
} )
</script>
</body>
Ruby
- Gem Install
gem install statosio
gem install prawn
gem install prawn-svg
gem install open-uri
- Implementation
require "statosio"
require "open-uri"
require "prawn"
require "prawn-svg"
url = "https://docs.statosio.com/data/performance.json"
file = OpenURI::open_uri( url ).read
dataset = JSON.parse( file )
statosio = Statosio::Generate.new
chart = statosio.svg(
dataset: dataset,
x: "name",
y: [ "mobile" ],
options: {"styleFontSizeText"=>20}
)
Prawn::Document.generate( "statosio.pdf" ) do | pdf |
pdf.svg( chart, width: 500 )
end
Example B.
Set default font size to: 5
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 | "https://docs.statosio.com/data/performance.json" | |
X | "name" | String |
Y | [ "mobile" ] | Array |
Options | { "styleFontSizeText" : 5 } | Object |
Javascript
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontSizeText" : 5 }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>docs.statosio - styleFontSizeText</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( "https://docs.statosio.com/data/performance.json" )
.then( ( file ) => {
d3.statosio(
file,
"name",
[ "mobile" ],
{ "styleFontSizeText" : 5 }
)
} )
</script>
</body>
Ruby
- Gem Install
gem install statosio
gem install prawn
gem install prawn-svg
gem install open-uri
- Implementation
require "statosio"
require "open-uri"
require "prawn"
require "prawn-svg"
url = "https://docs.statosio.com/data/performance.json"
file = OpenURI::open_uri( url ).read
dataset = JSON.parse( file )
statosio = Statosio::Generate.new
chart = statosio.svg(
dataset: dataset,
x: "name",
y: [ "mobile" ],
options: {"styleFontSizeText"=>5}
)
Prawn::Document.generate( "statosio.pdf" ) do | pdf |
pdf.svg( chart, width: 500 )
end