dataSortByNames

Here you can set type of sorting. You can choose between "ascending" and "decending"

Specification

Default implementation: { dataSortByNames : ascending }

Key

Name Alias Category 
dataSortByNames data__sort__by__names Data 

Value

Allow "ascending" or "decending" as value.

Default Validation Type 
"ascending" ^(?:ascending|decending) String 

Example A.

Set sequence to: ascending

Output

Open output in a blank window. Download examples as zip.

Parameters

This dataset shows the mobile and desktop google pagerank performance score for a certain website.

  Value Type
Source "../data/performance.json" String
X "name" String
Y [ "mobile", "desktop" ] Array
Options { "dataSortCurrent" : "names", "dataSortByNames" : "ascending" } Object

Source Code

  • Invoke Function
d3.statosio( 
    file, 
    "name", 
    [ "mobile",  "desktop" ], 
    { "dataSortCurrent" : "names", "dataSortByNames" : "ascending" }
)
  • HTML Implementation
<!DOCTYPE html>
<head>
    <title>d3.statosio - dataSortByNames</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",  "desktop" ], 
                    { "dataSortCurrent" : "names", "dataSortByNames" : "ascending" }
                )
            } )
    </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 and desktop google pagerank performance score for a certain website.

  Value Type
Source "../data/performance.json" String
X "name" String
Y [ "mobile", "desktop" ] Array
Options { "dataSortCurrent" : "names", "dataSortByNames" : "decending" } Object

Source Code

  • Invoke Function
d3.statosio( 
    file, 
    "name", 
    [ "mobile",  "desktop" ], 
    { "dataSortCurrent" : "names", "dataSortByNames" : "decending" }
)
  • HTML Implementation
<!DOCTYPE html>
<head>
    <title>d3.statosio - dataSortByNames</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",  "desktop" ], 
                    { "dataSortCurrent" : "names", "dataSortByNames" : "decending" }
                )
            } )
    </script>
</body>