-
Notifications
You must be signed in to change notification settings - Fork 40
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
VisConfigFile Default Behavior #30
Comments
You can remove some of the dimensions and measures, but not those in the charts. dimensions and measures are used to render the field options on the leftside of gwalkr, for example, you got dimensions = [d1, d2, d3]
measures = [m1, m2]
your_chart = {
"x": d1,
"y": m1
} You can remove But if you remove For the specification in the config.json is in pretty early stage, there might be some redundent information in it, and we will consider to optimize it soon. |
mhhh I don't think that quite what is was saying though.. what i mean is : this is the config.json I export from the UI: [
{
"config": {
"defaultAggregated": false,
"geoms": ["auto"],
"coordSystem": "generic",
"limit": -1
},
"encodings": {
"dimensions": [
{
"fid": "bmFtZQ==",
"name": "name",
"basename": "name",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "aGFpcl9jb2xvcg==",
"name": "hair_color",
"basename": "hair_color",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "c2tpbl9jb2xvcg==",
"name": "skin_color",
"basename": "skin_color",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "ZXllX2NvbG9y",
"name": "eye_color",
"basename": "eye_color",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "c2V4",
"name": "sex",
"basename": "sex",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "Z2VuZGVy",
"name": "gender",
"basename": "gender",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "aG9tZXdvcmxk",
"name": "homeworld",
"basename": "homeworld",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "c3BlY2llcw==",
"name": "species",
"basename": "species",
"semanticType": "nominal",
"analyticType": "dimension"
},
{
"fid": "gw_mea_key_fid",
"name": "Measure names",
"analyticType": "dimension",
"semanticType": "nominal"
}
],
"measures": [
{
"fid": "aGVpZ2h0",
"name": "height",
"basename": "height",
"analyticType": "measure",
"semanticType": "quantitative",
"aggName": "sum"
},
{
"fid": "bWFzcw==",
"name": "mass",
"basename": "mass",
"analyticType": "measure",
"semanticType": "quantitative",
"aggName": "sum"
},
{
"fid": "YmlydGhfeWVhcg==",
"name": "birth_year",
"basename": "birth_year",
"analyticType": "measure",
"semanticType": "quantitative",
"aggName": "sum"
},
{
"fid": "gw_count_fid",
"name": "Row count",
"analyticType": "measure",
"semanticType": "quantitative",
"aggName": "sum",
"computed": true,
"expression": {
"op": "one",
"params": [],
"as": "gw_count_fid"
}
},
{
"fid": "gw_mea_val_fid",
"name": "Measure values",
"analyticType": "measure",
"semanticType": "quantitative",
"aggName": "sum"
}
],
"rows": [],
"columns": [],
"color": [],
"opacity": [],
"size": [],
"shape": [],
"radius": [],
"theta": [],
"longitude": [],
"latitude": [],
"geoId": [],
"details": [],
"filters": [],
"text": []
},
"layout": {
"showActions": false,
"showTableSummary": false,
"stack": "stack",
"interactiveScale": false,
"zeroScale": true,
"size": {
"mode": "auto",
"width": 320,
"height": 200
},
"format": {},
"geoKey": "name",
"resolve": {
"x": false,
"y": false,
"color": false,
"opacity": false,
"shape": false,
"size": false
},
"scaleIncludeUnmatchedChoropleth": false,
"showAllGeoshapeInChoropleth": false,
"colorPalette": "greenBlue",
"useSvg": false,
"scale": {
"opacity": {},
"size": {}
},
"primaryColor": "rgba(153,0,239,0.58)"
},
"visId": "gw_Pyvk",
"name": "Chart 1"
}
] But I don't want to just redo this graph, I just want GWalkR session to start with the same defaults I chose, i.e. "defaultAggregated": false But if I just pass this config (removing the dimensions and measures .. the whole thing freezes and nothing is outputed. [
{
"config": {
"defaultAggregated": false,
"geoms": ["auto"],
"coordSystem": "generic",
"limit": -1,
"encodings": {
"rows": [],
"columns": [],
"color": [],
"opacity": [],
"size": [],
"shape": [],
"radius": [],
"theta": [],
"longitude": [],
"latitude": [],
"geoId": [],
"details": [],
"filters": [],
"text": []
}
},
"layout": {
"showActions": false,
"showTableSummary": false,
"stack": "stack",
"interactiveScale": false,
"zeroScale": true,
"size": {
"mode": "auto",
"width": 320,
"height": 200
},
"format": {},
"geoKey": "name",
"resolve": {
"x": false,
"y": false,
"color": false,
"opacity": false,
"shape": false,
"size": false
},
"scaleIncludeUnmatchedChoropleth": false,
"showAllGeoshapeInChoropleth": false,
"colorPalette": "greenBlue",
"useSvg": false,
"scale": {
"opacity": {},
"size": {}
},
"primaryColor": "rgba(153,0,239,0.58)"
},
"visId": "gw_Pyvk",
"name": "Chart 1"
}
] My bigger question is just : Am I making a mistake somewhere or is it just not supported ? Thanks again for your hard work ! |
I get it, you want some default settings for the gwalkr UI. like setting the default aggreted to be true or setting the stack mode to be center by default. It was a feature we discussed in |
Nice ! Let me know, thanks! |
Little question, I'm trying to set some custom values on the VisConfigFiles, i.e. PrimaryColor, Colorpalatte etc..
So i'm exporting the config.json as adviced but I would like it to be flexible for any kind of data.. so I remove the specifics dimensions and measures.. But if I do that, the GWalkR doesn't render anymore ..
If I don't, it just shows the exact same viz with the same data, which is not what I want to do obviously..
Does it make sense what I am trying to do ? and is there a way to achieve it ?
Thanks again
The text was updated successfully, but these errors were encountered: