dataSortByValues
Here you can set type of sorting. You can choose between "ascending" and "decending"
You need to activate this sorting type by setting up the general route in “sort current”
Specification
Default implementation: { dataSortByValues : decending }
Key
Name | Alias | Category |
dataSortByValues | data__sort__by__values | Data |
Value
Allow "ascending" or "decending" as value.
Default | Validation | Type |
"decending" | ^(?:ascending|decending) | String |
Example A.
Set sequence to: ascending
and hide average line.
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 | { "dataSortCurrent" : "values", "dataSortByValues" : "ascending", "showAverage" : false } | Object |
Source Code
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "dataSortCurrent" : "values", "dataSortByValues" : "ascending", "showAverage" : false }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>d3.statosio - dataSortByValues</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" ],
{ "dataSortCurrent" : "values", "dataSortByValues" : "ascending", "showAverage" : false }
)
} )
</script>
</body>
Example B.
Set sequence to: decending
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 | { "dataSortCurrent" : "values", "dataSortByValues" : "decending" } | Object |
Source Code
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "dataSortCurrent" : "values", "dataSortByValues" : "decending" }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>d3.statosio - dataSortByValues</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" ],
{ "dataSortCurrent" : "values", "dataSortByValues" : "decending" }
)
} )
</script>
</body>
Example C.
Set sequence to: ``````
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 | { "dataSortCurrent" : "none" } | Object |
Source Code
- Invoke Function
d3.statosio(
file,
"name",
[ "mobile" ],
{ "dataSortCurrent" : "none" }
)
- HTML Implementation
<!DOCTYPE html>
<head>
<title>d3.statosio - dataSortByValues</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" ],
{ "dataSortCurrent" : "none" }
)
} )
</script>
</body>