Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Difference between options field and setOptions method

$
0
0

Hello I was able to resolve these issue. I think something got messed up when I try to use setOptions to change the Series, valueAxis, or categoryAxis properties. The MVC wrappers create these properties as an Array and not an Object so you have to set all the properties again with setOptions. For example if your valueAxis configurations look like

"valueAxis": [{
            "labels": {
                "format": "{0}%"
            },
            "line": {
                "visible": false
            },
            "min": 0,
            "max": 100,
            "majorUnit": 10
        }]
and you wanted to update the format property:

//This would NOT work
var options = {
    "valueAxis": [{
        "labels": {
            "format": "{0} Calls"
        }
    }]
}
 
//Need to apply all valueAxis options again
//with changes
var options = {
    "valueAxis": [{
        "labels": {
            "format": "{0} Calls"
        },
        "line": {
            "visible": false
        },
        "min": 0,
        "max": 100,
        "majorUnit": 10
    }]
}

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>