deserialize method

  1. @override
void deserialize(
  1. XmlElement xml
)
override

Deserializes the FML template elements, attributes and children

Implementation

@override
void deserialize(XmlElement xml) {
  // deserialize
  super.deserialize(xml);

  // properties
  x = Xml.get(node: xml, tag: 'x');
  y = Xml.get(node: xml, tag: 'y');
  color = Xml.get(node: xml, tag: 'color');
  stroke = Xml.get(node: xml, tag: 'stroke');
  radius = Xml.get(node: xml, tag: 'radius');
  size = Xml.get(node: xml, tag: 'size');
  type = Xml.get(node: xml, tag: 'type');
  label = Xml.get(node: xml, tag: 'label');
  name = Xml.get(node: xml, tag: 'name');
  group = Xml.get(node: xml, tag: 'group');
  stack = Xml.get(node: xml, tag: 'stack');
  showarea = Xml.get(node: xml, tag: 'showarea');
  showline = Xml.get(node: xml, tag: 'showline');
  showpoints = Xml.get(node: xml, tag: 'showpoints');

  // Remove datasource listener. The parent chart will take care of this.
  if ((datasource != null) &&
      (scope != null) &&
      (scope!.datasources.containsKey(datasource))) {
    scope!.datasources[datasource!]!.remove(this);
  }

  // Setup the Series type and some internal properties for supporting it
  if (type != null) type = type?.trim().toLowerCase();
}