dojox/mvc/StatefulSeries is a chart data plugin (“series”) class that watches for properties specified in dojox/mvc/at handles in the given data. At initialization, and when the properties are updated, creates the data from data given and updates the chart.


In the example below, the chart changes from 25%/25%/50% to 10%/10%/80%, as the data model changes:

], function(Chart, blue, at, Stateful, StatefulSeries){
    var model = new Stateful({
        First: 25,
        Second: 25,
        Third: 50
    new Chart("chart")
     .addPlot("default", {type: "Pie"})
     .addSeries("default", new StatefulSeries([
        at(model, "First"),
        at(model, "Second"),
        at(model, "Third")
        model.set("First", 10);
        model.set("Second", 10);
        model.set("Third", 80);
    }, 2000);
<div id="chart"></div>

Table of Contents

Error in the documentation? Can’t find what you are looking for? Let us know!