title: JasperReports: Dynamically set time period in time series chart
body: <p>I'm currently facing some problems with time periods within a time series chart.</p>
  
  <p>What I want to achiveve:
  - User can choose two dates; The data between those dates is going to be reported
  - User can also choose the time period [Year, Month, Day] before creating report</p>
  
  <p>The way I'm trying to set time period is by setting the attribute timePeriod by Parameter like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;timeSeriesDataset timePeriod="$P{TimePeriod}"&gt;
  </code></pre>
  
  <p>But when trying to compile, I'm getting the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>org.xml.sax.SAXParseException: cvc-enumeration-valid: 
  Value '$P{TimePeriod}' is not facet-valid with respect to enumeration 
  '[Year, Quarter, Month, Week, Day, Hour, Minute, Second, Milisecond]'. 
  It must be a value from the enumeration.
  </code></pre>
  
  <p>I've tried everything (e.g. changing Parameter data type, ...) but I'm always ending up getting this error. Is it even possible to set <strong><em>timePeriod</em></strong> dynamically? And how to achieve it?</p>
  
  <p>Thanks in advance for your help!</p>