RhoInc / CAT

This Charting Application Tester (CAT) lets users make and adjust web graphics on the fly.
https://rhoinc.github.io/CAT/
MIT License
1 stars 0 forks source link

Figure out how to populate settings form with an array with multiple defaults. #56

Closed samussiah closed 6 years ago

samussiah commented 6 years ago

@tbaraldi noticed this issue with the safety-outlier-explorer library, whose details setting is an array that defines multiple defaults:

    ,"details":
        {"type": "array"
        ,"title": "Participant details"
        ,"description": "an array of ID-level variables and associated metadata"
        ,"defaultObject":
            [
                { "value_col": "AGE" , "label": "Age"  },
                { "value_col": "SEX" , "label": "Sex"  },
                { "value_col": "RACE", "label": "Race" }
            ]
        ,"items":
            {"type": "object"
            ,"properties":
                {"value_col":
                    {"type": "string"
                    ,"title": "Variable name"
                    ,"default": "AGE"
                    }
                ,"label":
                    {"type": "string"
                    ,"title": "Variable label"
                    ,"default": "Age"
                    }
                }
            }
        }
samussiah commented 6 years ago

Try out alpaca.js: http://www.alpacajs.org/