Jump to content

setTimePeriod(Hour.class) failure?


thangalin

Recommended Posts

Hi,

    JRTimeSeriesDataset dataset = getDataset();

    System.out.println( "DataSet: " + dataset.toString() );
    System.out.println( "BEFORE DataSet Time: " + dataset.getTimePeriod() );
   
    dataset.setTimePeriod( org.jfree.data.time.Hour.class );
    System.out.println( "AFTER DataSet Time: " + dataset.getTimePeriod() );

Output:

DataSet: net.sf.jasperreports.charts.fill.JRFillTimeSeriesDataset@18eb736
BEFORE DataSet Time: class org.jfree.data.time.Day
AFTER DataSet Time: class org.jfree.data.time.Day

Any idea why the time period does not change?



Post Edited by thangalin at 03/25/2010 16:01
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

package net.sf.jasperreports.charts.fill;

/**
* @author Flavius Sana (flavius_sana@users.sourceforge.net)
* @version $Id: JRFillTimeSeriesDataset.java 3032 2009-08-27 11:32:28Z teodord $
*/
public class JRFillTimeSeriesDataset extends JRFillChartDataset implements JRTimeSeriesDataset
{
   public Class getTimePeriod() {
    return ((JRTimeSeriesDataset)parent).getTimePeriod();
  }

  public void setTimePeriod(Class timePeriod) {
  }
}

I think that's the problem.



Post Edited by thangalin at 03/25/2010 22:30
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...