-
Notifications
You must be signed in to change notification settings - Fork 5
Allow user to specify variable/chart type for a column #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I guess this would be implemented by adding an option to the js renderer that lets the user specify the variable type (instead of only doing it via auto-detection) and then just writing a little loop on the r side of things to pull variable types and pass them to the js function in the proper format. Isn't really all that different that letting the user specify the label or something like that, so definitely possible. Let's revisit after v1.2 is out the door. |
See #149 for a possible approach. |
#149 is in place, but currently users cannot coerce the chart type of a given column. We could set something up that is similar to label handling via |
@bzkrouse I'm currently leaning towards leaving this out of v1.3.0. I'm worried unless the Worth tackling eventually, but it would be a fairly big effort. |
|
Updated type implementation to mirror the approach to column labels. The relevant settings are |
Test NotesConfirm that users can set the type for a variable via config.variableTypes or config.meta[].type (which takes precedence). Using CAT with the default ADAE dataset, do the following:
-Confirm that "variableType" takes precedence over "meta", try the various combinations of "continuous" and "categorical" and confirm the chart renders as expected:
|
Looks good. No matter if it's continuous or categorical, the VariableTypes take precedence over Meta. |
As we continue to connect R + JS, here's another thing to consider: Having the JS side accept the variable type from R. This will ensure that the codebook matches what's happening in the analysis workflow. For example, if the R user changes the variable type (e.g. categorical -> numeric) it would reflect on the JS side.
The text was updated successfully, but these errors were encountered: