dataXSelectors

Expect one or more names which are included in the x range.

Note

The selection can get formatted in the “style” category.

Specification

Default implementation: { dataXSelectors : [] }

Key

Name Alias Category 
dataXSelectors data__x__selectors Data 

Value

Allow A-Z, a-b and 0-9 as value.

Default Validation Type 
[] ^[a-zA-Z0-9]*$ Array 

Example A.

Selection is set to: ["Data"]

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 { "dataXSelectors" : ["Data"], "showAverage" : false } Object

Source Code

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

Example B.

Multiple selections are set: ["Spock", "Data"]

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 { "dataXSelectors" : ["Spock", "Data"] } Object

Source Code

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