Square brackets inside JSON – Escaping not working
-
Hi.
I need to supply an array inside the JSON of an attribute value.
Here’s the javascript notation from the Charts docs. (This is for a bubble chart.)
colorAxis: {colors:['red','#004411']}Based on the plugin docs, I substituted %5B%5B %5D%5D for the brackets and got this:
chart_color_axis='{"colors": %5B%5B "red", "#004411" %5D%5D}'but the attribute isn’t recognized.
Here’s the whole gdoc code
[gdoc key="https://docs.google.com/spreadsheets/d/1Fv-OFdyIO2yUAIG6OqzzQZAwl20cj4Z1g6ratm-tExc/edit#gid=121136156" chart="Bubble" title="2015" chart_height=600 chart_legend='{"position": "none"}' chart_size_axis='{"minSize": 15, "maxSize": 40}' chart_v_axis='{"maxValue": 250, "title": "Days on Market"}' chart_h_axis='{"title": "Number of Sales"}' chart_color_axis='{"colors"; %5B%5B "red", "#004411" %5D%5D}']Output is bottom chart at
http://test.edkatzman.com/index.php/2017/01/15/bubble-chart/
Thanks again.
The topic ‘Square brackets inside JSON – Escaping not working’ is closed to new replies.