Package org.timepedia.chronoscope.client

Examples of org.timepedia.chronoscope.client.XYDataset


     delayTestFinish(15000);
     Chronoscope.setMicroformatsEnabled(true);
     Microformats.setMicroformatsReadyListener(new Command() {
       public void execute() {
         Chart c=Chronoscope.getChartById("microformatdemochrono");
         XYDataset xy = c.getPlot().getDataset(0);
         Date start = new Date(53, 0, 1, 0, 0, 0);
         Date end = new Date(64, 0, 1, 0, 0 ,0);
         assertEquals(start.getTime(), (long)xy.getX(0));
         assertEquals(end.getTime(), (long)xy.getX(xy.getNumSamples()-1));
         finishTest();
       }
     });
     Chronoscope.initialize();
  }
View Full Code Here


  /**
   * Test that issue #23 is fixed http://code.google.com/p/gwt-chronoscope/issues/detail?id=23
   */
  public void testAutoAssignDatasetAxesSameAxis() {

    XYDataset ds[] = new XYDataset[2];
    ds[0] = new MockXYDataset();
    ds[1] = new MockXYDataset();
    runChronoscopeTest(ds, new ViewReadyCallback() {
      public void onViewReady(View view) {
        XYPlot plot = view.getChart().getPlot();
View Full Code Here

  /**
   * Test that issue #23 is fixed http://code.google.com/p/gwt-chronoscope/issues/detail?id=23
   */
  public void testAutoAssignDatasetAxesDifferentAxis() {

    XYDataset ds[] = new XYDataset[2];
    ds[0] = new MockXYDataset();
    MockXYDataset mds = new MockXYDataset();
    mds.setAxisId("different");
    ds[1] = mds;

View Full Code Here

  /**
   * Test fix for issue #28
   */
  public void testComputeDomainMinMax() {
    final XYDataset ds[] = new XYDataset[2];
    ds[0] = Fixtures.getNegativeDomainAscendingRange();
    ds[1] = Fixtures.getPositiveDomainDescendingRange();

    runChronoscopeTest(ds, new ViewReadyCallback() {
      public void onViewReady(View view) {
View Full Code Here

  public void testGetApproximateMinimumInterval() {
    MockXYDataset mxy = new MockXYDataset();
    assertTrue("Approximate minimum interval should be atleast less than twice as big as first two datapoints in Mock dataset",
        mxy.getApproximateMinimumInterval() <= 2 * (mxy.getX(1) - mxy.getX(0)));
   
    XYDataset xy = Fixtures.getPositiveDomainDescendingRange();
    assertTrue("Approximate minimum interval should be atleast less than twice as big as first two datapoints in Fixture dataset",
      xy.getApproximateMinimumInterval() <= 2 * (xy.getX(1) - mxy.getX(0)));
  }
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.XYDataset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.