/** * Chart output for HTML table. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_output_htmltable */ define("core/chart_output_htmltable",["jquery","core/chart_output_base"],(function($,Base){function Output(){Base.prototype.constructor.apply(this,arguments),this._build()}return Output.prototype=Object.create(Base.prototype),Output.prototype._build=function(){this._node.empty(),this._node.append(this._makeTable())},Output.prototype._makeTable=function(){var node,value,tbl=$(""),c=this._chart,labels=c.getLabels(),hasLabel=labels.length>0,series=c.getSeries(),rowCount=series[0].getCount();tbl.addClass("chart-output-htmltable generaltable"),null!==c.getTitle()&&tbl.append($(""),hasLabel&&node.append($("
").text(c.getTitle())),node=$("
")),series.forEach((function(serie){node.append($("").text(serie.getLabel()).attr("scope","col"))})),tbl.append(node);for(var rowId=0;rowId"),labels.length>0&&node.append($("").text(labels[rowId]).attr("scope","row"));for(var serieId=0;serieId").text(value));tbl.append(node)}return tbl},Output.prototype.update=function(){this._build()},Output})); //# sourceMappingURL=chart_output_htmltable.min.js.map