You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
941 B
1 line
941 B
2 years ago
|
define(["jquery","core/chart_output_base"],function(a,b){function c(){b.prototype.constructor.apply(this,arguments),this._build()}return c.prototype=Object.create(b.prototype),c.prototype._build=function(){this._node.empty(),this._node.append(this._makeTable())},c.prototype._makeTable=function(){var b,c,d,e=a("<table>"),f=this._chart,g=f.getLabels(),h=g.length>0,i=f.getSeries(),j=i[0].getCount();e.addClass("chart-output-htmltable generaltable"),null!==f.getTitle()&&e.append(a("<caption>").text(f.getTitle())),b=a("<tr>"),h&&b.append(a("<td>")),i.forEach(function(c){b.append(a("<th>").text(c.getLabel()).attr("scope","col"))}),e.append(b);for(var k=0;k<j;k++){b=a("<tr>"),g.length>0&&b.append(a("<th>").text(g[k]).attr("scope","row"));for(var l=0;l<i.length;l++)c=i[l].getValues()[k],d=i[l].getLabels(),null!==d&&(c=i[l].getLabels()[k]),b.append(a("<td>").text(c));e.append(b)}return e},c.prototype.update=function(){this._build()},c});
|