score:4

Accepted answer

Could you please try following:

 String rangeSelectorConfig =  " {\n" +
            "                buttons: [{\n" +
            "                    type: 'day',\n" +
            "                    count: 3,\n" +
            "                    text: '3dias'\n" +
            "                }, {\n" +
            "                    type: 'week',\n" +
            "                    count: 1,\n" +
            "                    text: '1w'\n" +
            "                }]" +
            "            }" ;
 JSONValue config = JSONParser.parseLenient(rangeSelectorConfig);
 chart.setOption("/rangeSelector", config);

Chart class (with help of Configurable) doesn't parse JSON objects for you, so buttons in your code were passed as string literals to native HightCharts JS.


Related Query

More Query from same tag