UNPKG

@difftim/excelize

Version:

Excel Workbook Manager - Read and Write xlsx and csv Files.

59 lines (58 loc) 1.24 kB
const BaseXform = require('../../base-xform'); const CSerXform = require('./c-ser-xform'); class CLineChart extends BaseXform { constructor() { super(); this.map = { 'c:ser': new CSerXform() }; } get tag() { return 'c:lineChart'; } render(xmlStream, model) { xmlStream.openNode(this.tag); this.map['c:ser'].render(xmlStream, model); xmlStream.closeNode(); } parseOpen(node) { if (this.parser) { this.parser.parseOpen(node); return true; } switch (node.name) { case this.tag: this.reset(); break; default: this.parser = this.map[node.name]; if (this.parser) { this.parser.parseOpen(node); } break; } return true; } parseText(text) { if (this.parser) { this.parser.parseText(text); } } parseClose(name) { if (this.parser) { if (!this.parser.parseClose(name)) { this.parser = undefined; } return true; } switch (name) { case this.tag: this.model = this.map['c:ser'].model; return false; default: return true; } } } module.exports = CLineChart; //# sourceMappingURL=line-chart-xform.js.map