I have the following code in my component which uses salesforce highcharts

var FILTERS = {!filtersJSON};

function addFilters() {
        var pickers = [];
        console.log('FILTERS===> ' + FILTERS);
        for (var i=0; i<FILTERS.length; i++) {
            var picker = addPicker2(FILTERS[i], function(selectedID) {
                var selections = [];
                for (var i=0; i<pickers.length; i++) {
                    var curPicker = pickers[i];
                    var sel = curPicker.options[curPicker.selectedIndex].value;
                    if (sel)
                console.log('Updating chart with filters: ' + selections);
                refreshChart('{!chartID}', '{!object.ID}', selections);

I am using the JSINHTMLENCODE to encode in the following way


After encoding the variable like above I am facing java script issues. The chart is not displaying.

Can anyone help me on this?

  • Can you view the rendered source and paste us the JSON you're getting? – bigassforce Jan 21 '14 at 8:10
  • Can you expand on the JavaScript issues - it may be a simple syntax error. – Bob Buzzard Jan 21 '14 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.