Examples of ChartPanel


Examples of org.jfree.chart.ChartPanel

     *
     * @return A panel.
     */
    public static JPanel createDemoPanel() {
        JFreeChart chart = createChart(createDataset());
        ChartPanel panel = new ChartPanel(chart);
        panel.setMouseWheelEnabled(true);
        return panel;
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    createDatasetPV(rsPVProfileWinter, "PV Winter", qPVMaxPowerValues[2]);
   
    //some instructions to draw the chart
    XYDataset dataset = xySeriesCollDataset;
    JFreeChart chart = createChart(dataset);
    ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
    setContentPane(chartPanel);   
  }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

  private void createFrame(
      String chartName,
      String eventType,
      ParCollection params,
      JFreeChart chart) {
    ChartPanel chartPanel = new ChartPanel(chart);
    JFrame frame = new JFrame(eventType + " [" + chartName + "]");
    frame.getContentPane().add(chartPanel, BorderLayout.CENTER);
    frame.setBounds(200, 120, 600, 280);
    if (params.getParValueBoolean("showLiveCharts?")) {
        frame.setVisible(true);
View Full Code Here

Examples of org.jfree.chart.ChartPanel

        super(title);
        PieDataset dataset = createDataset();
        JFreeChart chart = createChart(dataset);

        // add the chart to a panel...
        ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
        setContentPane(chartPanel);

    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    public void initChart()
    {
        log.info("Initializing");
        final JFreeChart chart = ChartFactory.createLineChart3D(
                "Free Memory", "Time", "Bytes", catDataSet, PlotOrientation.VERTICAL, true, true, true);
        final ChartPanel chartPanel = new ChartPanel(chart);
        setContentPane(chartPanel);
    }
View Full Code Here

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

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

                  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

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

  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

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

     
      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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.