Package org.timepedia.chronoscope.client.browser

Examples of org.timepedia.chronoscope.client.browser.ChartPanel


    return $doc.getElementsByTagName("head")[0];
  }-*/;

  
  protected void runChronoscopeTest(XYDataset ds[], ViewReadyCallback viewReadyCallback) {
    ChartPanel cp = Chronoscope.createTimeseriesChart(ds, 600, 400);
    cp.setReadyListener(viewReadyCallback);
    delayTestFinish(15000);
    RootPanel.get().add(cp);
  }
View Full Code Here


                  setTitle.setTitle(prefs.chartTitle().getValue());
                  DataTable table = response.getDataTable();
                  Dataset ds[] = DataTableParser.parseDatasets(table, null);
                  final Marker ms[] = DataTableParser.parseMarkers(table, table, null);

                  ChartPanel cp = Chronoscope.createTimeseriesChart(ds,
                      Window.getClientWidth(), Window.getClientHeight());
                    GssContext gssContext = prefs.chartStyle().getValue().getGssContext();
                    ((DefaultGssContext)gssContext).setShowAxisLabels(prefs.axisLabels().getValue());
                    cp.setGssContext(gssContext);

                  cp.setReadyListener(new ViewReadyCallback() {
                    public void onViewReady(View view) {
                      view.getChart().getPlot().setOverviewEnabled(prefs.overviewEnabled().getValue());
                      view.getChart().getPlot().setLegendEnabled(prefs.legendEnabled().getValue());
                      for (Marker m : ms) {
                        view.getChart().getPlot().addOverlay(m);
View Full Code Here

  public void onModuleLoad() {
    Chronoscope.setMicroformatsEnabled(true);
    Chronoscope.initialize();
    Chronoscope chrono = Chronoscope.getInstance();
   
    ChartPanel chartPanel = Chronoscope.createTimeseriesChartById("chart", ChartDemoSlowIE.getJsons("jagged"), 480, 320, new ViewReadyCallback() {
      public void onViewReady(View view) {
       
        DefaultXYPlot theplot = (DefaultXYPlot) view.getChart().getPlot();
       
        theplot.setAutoZoomVisibleRange(0, true);
View Full Code Here

     
      VerticalPanel v = new VerticalPanel();
      v.setSpacing(20);
      RootPanel.get().add(v);
     
      ChartPanel chartPanel = Chronoscope.createTimeseriesChartWithDatasetVarName(
          "interestRates01", "interestRates02");
      chartPanel.getElement().getStyle().setCursor(Cursor.POINTER);
      chartPanel.setViewReadyCallback(new ViewReadyCallback() {
        public void onViewReady(final View view) {
          Dataset<?> dataset = view.getChart().getPlot().getDatasets().get(0);
          final Marker m = new Marker(dataset.getDomainExtrema().midpoint(),
              "A", 0);
          m.addOverlayClickListener(new OverlayClickListener() {
            public void onOverlayClick(Overlay overlay, int x, int y) {
              m.openInfoWindow("Hello");
            }
          });

          XYPlot<?> plot = view.getChart().getPlot();
          plot.setOverviewVisible(true);
          plot.setDatasetRenderer(1, new LineXYRenderer());
          plot.addOverlay(m);
          ((DefaultXYPlot<?>)plot).redraw(true);
        }
      });
      v.add(chartPanel);

      final ChartPanel chartPanel2 = Chronoscope.createTimeseriesChartWithDatasetVarName(
          "interestRates01", "interestRates02");
      int chartWidth = 600;
      int chartHeight = (int) (chartWidth / GOLDEN__RATIO);
      chartPanel2.setDimensions(chartWidth, chartHeight);
      chartPanel2.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
      chartPanel2.getElement().getStyle().setPadding(5, Unit.PX);
      v.add(chartPanel2);

    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

    ChronoscopeOptions.setCrosshairDateTimeFormat("dd/MMM, HH:mm");

    Chronoscope chronoscope = Chronoscope.getInstance();
    Dataset[] datasets = chronoscope.createDatasets(getJsons("odd_display_jagged"));
   
    ChartPanel chartPanel = Chronoscope.createTimeseriesChart(datasets, 480, 320);
    chartPanel.setReadyListener(new ViewReadyCallback() {
      public void onViewReady(View view) {
        theplot = view.getChart().getPlot();
        theplot.getRangeAxis(0).setAutoZoomVisibleRange(true);
       
        Dataset d = theplot.getDatasets().get(0);
View Full Code Here

      Chronoscope.initialize();
      mockDsFactory = new MockDatasetFactory(Chronoscope.get().getComponentFactory().getDatasetFactory());
      final Dataset[] ds = new Dataset[2];
      ds[0] = Chronoscope.get().getDatasetReader().createDatasetFromJson(new GwtJsonDataset(getJson("unratedata")));
      ds[1] = mockDsFactory.getBasicDataset();
      final ChartPanel chartPanel = Chronoscope
          .createTimeseriesChart(ds, chartWidth, chartHeight);
      chartPanel.setReadyListener(new ViewReadyCallback() {
        public void onViewReady(final View view) {
          final Marker m = new Marker(
              ds[0].getDomainExtrema().midpoint(), "A", 0);
          m.addOverlayClickListener(new OverlayClickListener() {
            public void onOverlayClick(Overlay overlay, int x, int y) {
View Full Code Here

*/
public class ChronoUI extends Composite {
  private ChartPanel chart = new ChartPanel();

  public ChronoUI() {
    chart = new ChartPanel();
    initWidget(chart);
  }
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.browser.ChartPanel

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.