widget

[ root » graph » widget ]

A way to extend default ZingChart functionality with object syntax.


          
Original JSON:
    ...
    "widgets":[
        {
            type : "myWidget",
            x : 100,
            y : 200,
            ...
        }
    ]
    ...
    JavaScript Code:
    ...
    zingchart.widgets.myWidget = {
        parse : function(data) {
            return {
                "graphs" : [{...}],
                "labels" : [{...}],
                "shapes" : [{...}]
            };
        }   
    };
        

AttributeTypeInfo

type

String

Type of the widget. The zingchart.widgets.myWidget object must exist and define a "parse" method returning an object with "graphs", "labels" and "shapes" collections which will be injected in the original JSON.

"myWidget" | ...