reporting: change vline to accept only one dates

time-shift
Houtan Bastani 2014-05-20 14:28:59 +02:00
parent 0247faa9ed
commit b0386575d6
2 changed files with 3 additions and 2 deletions

View File

@ -67,7 +67,8 @@ assert(~(strcmp(o.graphLineStyle, 'none') && isempty(o.graphMarker)), ['@report_
'you must provide at least one of graphLineStyle and graphMarker']);
% Validate graphVline
assert(isdates(o.graphVline), '@report_series.writeSeriesForGraph: graphVline must be a dates');
assert(isempty(o.graphVline) || (isdates(o.graphVline) && o.graphVline.ndat == 1), ...
'@report_series.writeSeriesForGraph: graphVline must be a dates of size one');
assert(isempty(o.graphHline) || isnumeric(o.graphHline), ...
'@report_series.writeSeriesForGraph: graphHline must a single numeric value');

View File

@ -184,7 +184,7 @@ rep = rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ...
'graphLineColor', 'green', ...
'graphLineStyle', 'solid', ...
'graphLineWidth', 1.5);
rep = rep.addSeries('graphVline', dates('2009q2'):dates('2010q1'), ...
rep = rep.addSeries('graphVline', dates('2009q2'), ...
'graphLineColor', 'red', ...
'graphLineWidth', 1.5);