reporting: fix bug where a whole row wasn’t colored if the tableSubSectionHeader option was passed at the same time
parent
19134d1287
commit
1f3ae372fe
|
@ -1,5 +1,5 @@
|
|||
function o = writeSeriesForTable(o, fid, dates, precision)
|
||||
%function o = writeSeriesForTable(o, fid, dates, precision)
|
||||
function o = writeSeriesForTable(o, fid, dates, precision, ncols)
|
||||
%function o = writeSeriesForTable(o, fid, dates, precision, ncols)
|
||||
% Write Table Row
|
||||
%
|
||||
% INPUTS
|
||||
|
@ -7,6 +7,7 @@ function o = writeSeriesForTable(o, fid, dates, precision)
|
|||
% fid [int] file id
|
||||
% dates [dates] dates for report_series slice
|
||||
% precision [float] precision with which to print the data
|
||||
% ncols [int] total number of columns in table
|
||||
%
|
||||
%
|
||||
% OUTPUTS
|
||||
|
@ -69,6 +70,9 @@ if ~isempty(o.tableRowColor)
|
|||
end
|
||||
if ~isempty(o.tableSubSectionHeader)
|
||||
fprintf(fid, '%s', o.tableSubSectionHeader);
|
||||
for i=1:ncols-1
|
||||
fprintf(fid, ' &');
|
||||
end
|
||||
fprintf(fid, '\\\\%%\n');
|
||||
return;
|
||||
end
|
||||
|
|
|
@ -170,7 +170,7 @@ fprintf(fid, '%%\n');
|
|||
|
||||
% Write Report_Table Data
|
||||
for i=1:ne
|
||||
o.series{i}.writeSeriesForTable(fid, o.range, o.precision);
|
||||
o.series{i}.writeSeriesForTable(fid, o.range, o.precision, ncols);
|
||||
if o.showHlines
|
||||
fprintf(fid, '\\hline\n');
|
||||
end
|
||||
|
|
|
@ -20,6 +20,8 @@ shortNames = {'US', 'EU', 'JA', 'EA6', 'LA6', 'RC6'};
|
|||
longNames = {'Coca Cola', 'Kinder Bueno', 'Pizza', ...
|
||||
'Vegetarianism Is Good', 'OS X', 'Dothraki'};
|
||||
|
||||
rep = rep.addSeries('tableSubSectionHeader', 'A group', ...
|
||||
'tableRowColor', 'red!22');
|
||||
for i=1:length(shortNames)
|
||||
db_a = db_a.tex_rename([seriesRootName shortNames{i}], longNames{i});
|
||||
rep = rep.addSeries('data', db_a{[seriesRootName shortNames{i}]});
|
||||
|
|
Loading…
Reference in New Issue