reporting: add new series option tableSubSectionHeader
parent
b207477c66
commit
79f03773d7
|
@ -8466,7 +8466,7 @@ Whether or not to show vertical lines separating the columns. Default: @code{fal
|
||||||
@end defmethod
|
@end defmethod
|
||||||
|
|
||||||
@anchor{addSeries}
|
@anchor{addSeries}
|
||||||
@defmethod Report addSeries data, graphLineColor, graphLineStyle, graphLineWidth, graphMarker, graphMarkerEdgeColor, graphMarkerFaceColor, graphMarkerSize, tableRowColor, tableShowMarkers, tableAlignRight, tableNegColor, tablePosColor, zerotol
|
@defmethod Report addSeries data, graphLineColor, graphLineStyle, graphLineWidth, graphMarker, graphMarkerEdgeColor, graphMarkerFaceColor, graphMarkerSize, tableRowColor, tableShowMarkers, tableAlignRight, tableNegColor, tablePosColor, tableSubSectionHeader, zerotol
|
||||||
Adds a @code{Series} to a @code{Graph} or a @code{Table}.
|
Adds a @code{Series} to a @code{Graph} or a @code{Table}.
|
||||||
@optionshead
|
@optionshead
|
||||||
@table @code
|
@table @code
|
||||||
|
@ -8524,6 +8524,11 @@ zero. Default: @code{`red'}
|
||||||
The color to use when marking Table data that is greater than
|
The color to use when marking Table data that is greater than
|
||||||
zero. Default: @code{`blue'}
|
zero. Default: @code{`blue'}
|
||||||
|
|
||||||
|
@item tableSubSectionHeader, @code{STRING}
|
||||||
|
A header for a subsection of the table. No data will be associated
|
||||||
|
with it. It is equivalent to adding an empty series with a
|
||||||
|
name. Default: @code{''}
|
||||||
|
|
||||||
@item zerotol, @code{DOUBLE}
|
@item zerotol, @code{DOUBLE}
|
||||||
The zero tolerance. Anything smaller than @code{zerotol} and larger
|
The zero tolerance. Anything smaller than @code{zerotol} and larger
|
||||||
than @code{-zerotol} will be set to zero before being
|
than @code{-zerotol} will be set to zero before being
|
||||||
|
|
|
@ -49,6 +49,7 @@ o.tableNegColor = 'red';
|
||||||
o.tablePosColor = 'blue';
|
o.tablePosColor = 'blue';
|
||||||
o.tableMarkerLimit = 1e-4;
|
o.tableMarkerLimit = 1e-4;
|
||||||
|
|
||||||
|
o.tableSubSectionHeader = '';
|
||||||
o.tableAlignRight = false;
|
o.tableAlignRight = false;
|
||||||
|
|
||||||
o.tableRowColor = 'white';
|
o.tableRowColor = 'white';
|
||||||
|
|
|
@ -37,8 +37,11 @@ assert(isa(dates, 'dynDates'));
|
||||||
assert(isint(precision));
|
assert(isint(precision));
|
||||||
|
|
||||||
%% Validate options provided by user
|
%% Validate options provided by user
|
||||||
|
assert(ischar(o.tableSubSectionHeader), '@series.write: tableSubSectionHeader must be a string');
|
||||||
|
if isempty(o.tableSubSectionHeader)
|
||||||
assert(~isempty(o.data) && isa(o.data, 'dynSeries'), ...
|
assert(~isempty(o.data) && isa(o.data, 'dynSeries'), ...
|
||||||
'@series.write: must provide data as a dynSeries');
|
'@series.write: must provide data as a dynSeries');
|
||||||
|
end
|
||||||
|
|
||||||
assert(ischar(o.tableNegColor), '@series.write: tableNegColor must be a string');
|
assert(ischar(o.tableNegColor), '@series.write: tableNegColor must be a string');
|
||||||
assert(ischar(o.tablePosColor), '@series.write: tablePosColor must be a string');
|
assert(ischar(o.tablePosColor), '@series.write: tablePosColor must be a string');
|
||||||
|
@ -54,6 +57,14 @@ fprintf(fid, '%% Table Row (series)\n');
|
||||||
if ~isempty(o.tableRowColor)
|
if ~isempty(o.tableRowColor)
|
||||||
fprintf(fid, '\\rowcolor{%s}', o.tableRowColor);
|
fprintf(fid, '\\rowcolor{%s}', o.tableRowColor);
|
||||||
end
|
end
|
||||||
|
if ~isempty(o.tableSubSectionHeader)
|
||||||
|
fprintf(fid, '%s', o.tableSubSectionHeader);
|
||||||
|
for i=1:size(dates)
|
||||||
|
fprintf(fid, ' & ');
|
||||||
|
end
|
||||||
|
fprintf(fid, '\\\\%%\n');
|
||||||
|
return;
|
||||||
|
end
|
||||||
if o.tableAlignRight
|
if o.tableAlignRight
|
||||||
fprintf(fid, '\\multicolumn{1}{r}{');
|
fprintf(fid, '\\multicolumn{1}{r}{');
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue