deserialize method
Deserializes the FML template elements, attributes and children
Implementation
@override
void deserialize(XmlElement xml) {
//* Deserialize */
super.deserialize(xml);
/////////////////
//* Properties */
/////////////////
selected = Xml.get(node: xml, tag: 'selected');
animated = Xml.get(node: xml, tag: 'animated');
horizontal = Xml.get(node: xml, tag: 'horizontal');
showlegend = Xml.get(node: xml, tag: 'showlegend');
legendsize = Xml.get(node: xml, tag: 'legendsize');
type = Xml.get(node: xml, tag: 'type');
spacing = Xml.get(node: xml, tag: 'spacing');
centerRadius = Xml.get(node: xml, tag: 'centerradius');
// Set Series
this.series.clear();
List<PieChartSeriesModel> series =
findChildrenOfExactType(PieChartSeriesModel)
.cast<PieChartSeriesModel>();
for (var model in series) {
// add the series to the list
this.series.add(model);
// register listener to the datasource
IDataSource? source =
(scope != null) ? scope!.getDataSource(model.datasource) : null;
if (source != null) source.register(this);
}
}