googledatastudio / tooling

Apache License 2.0
68 stars 30 forks source link

dscc-scripts viz build make error on INTERVAL Style settings #240

Open valentin-pellegrin opened 3 years ago

valentin-pellegrin commented 3 years ago

The defaultValue of an INTERVAL Style settings must be a integer but the script accept only string and string doesn't works for this type of settings. Options key doesn't work too.

Error : Invalid config: ["The value at: .style[1].elements[3].type is invalid. should be equal to one of the allowed values.", "The value at: .style[1].elements[3].defaultValue is invalid. should be string.", "The value at: .style[1].elements[3].defaultValue is invalid. should be object.", "The value at: .style[1].elements[3] is invalid. should have required property 'options'.", "The value at: .style[1].elements[3] is invalid. should match some schema in anyOf."]

Values :

{ "id": "myId", "label": "My Label", "type": "INTERVAL", "defaultValue": 0 }

{ "id": "myId", "label": "My Label", "type": "INTERVAL", "options": [ { "max": "100", "min": "0" }, ] }

{ "id": "myId", "label": "My Label", "type": "INTERVAL", "defaultValue": 0 "options": [ { "max": "100", "min": "0" }, ] }

{ "id": "myId", "label": "My Label", "type": "INTERVAL", "defaultValue": 0 "options": [ { "max": 100, "min": 0 }, ] }

td-heinm commented 2 years ago

This problem sadly still exists.

If I use (type: "strings") the build process works, yet Data Studio (browser) throws errors. If I user (type: "numbers") I cant even finish the build process. I just don't get why whoever changed the type from strings to numbers didn't fix everything else that is connected to it.

Would be great if someone added a "fix" to that as I have to work with textfields now, which is kind of a dirty workaround in my eyes...

harri35 commented 6 months ago

Still a problem. Any plans to improve this? :)