UNPKG

@difftim/excelize

Version:

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

37 lines (36 loc) 833 B
const BaseXform = require('../../base-xform'); class CBarDir extends BaseXform { get tag() { return 'c:barDir'; } render(xmlStream, model) { xmlStream.leafNode(this.tag, { 'xmlns:r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', val: model.val, cstate: 'print' }); } parseOpen(node) { switch (node.name) { case this.tag: this.model = { type: node.attributes.val === 'col' ? 'c:ColumnChart' : 'c:BarChart' }; return true; default: return true; } } parseText() {} parseClose(name) { switch (name) { case this.tag: return false; default: // unprocessed internal nodes return true; } } } module.exports = CBarDir; //# sourceMappingURL=c-bar-dir-xform.js.map