Examples of Chart


Examples of org.sonar.api.charts.Chart

    if (isDeprecatedChart(request)) {
      deprecatedDoGet(request, response);

    } else {
      ChartFactory chartFactory = Platform.getInstance().getContainer().getComponentByType(ChartFactory.class);
      Chart chart = chartFactory.getChart(request.getParameter("ck"));
      if (chart != null) {
        BufferedImage image = chart.generateImage(getParams(request));
        OutputStream out = response.getOutputStream();
        try {
          response.setContentType("image/png");
          exportAsPNG(image, out);

        } catch (Exception e) {
          LOG.error("Generating chart " + chart.getClass().getName(), e);

        } finally {
          out.close();
        }
      }
View Full Code Here

Examples of org.swtchart.Chart

    buttonAdd.setEnabled(true);
  }
 
  private void renderChart(Composite composite) {
    compositeChart.setLayout(new FillLayout(SWT.HORIZONTAL));
    chart = new Chart(composite, SWT.NONE);
    chart.setVisible(true);
    ITitle title = chart.getTitle();
    title.setText("Sieve Test Chart");
  }
View Full Code Here

Examples of org.timepedia.chronoscope.client.Chart

     RootPanel.get().add(data);
     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();
View Full Code Here

Examples of org.timepedia.chronoscope.client.Chart

  }

  public StaticImageChartPanel(Dataset[] ds, boolean interactive, int width,
      int height, GssContext gssContext) {
    this.interactive = interactive;
    chart = new Chart();
    plot = new DefaultXYPlot();
    Datasets dss = new Datasets(ds);

    plot.setDatasets(dss);
    plot.setOverviewEnabled(false);
View Full Code Here

Examples of org.timepedia.chronoscope.client.Chart

      int height, String css, boolean interactive, double domainOrigin,
      double currentDomain, boolean az) {
    StaticImageChartPanel sicp = ServerChronoscope.get()
        .createChart(new Datasets(ds), width, height, null);

    Chart c = sicp.getChart();

    XYPlot xyPlot = c.getPlot();
    xyPlot.getRangeAxis(0).setAutoZoomVisibleRange(az);

    xyPlot.getDomain().setEndpoints(domainOrigin, currentDomain);
    c.redraw();

    BufferedImage bimg = (BufferedImage) sicp.getImage();
    return bimg;
  }
View Full Code Here

Examples of org.timepedia.chronoscope.client.Chart

    addKeyListener(this);


    label = new JLabel();

    chart = new Chart();
    plot = new DefaultXYPlot();
    plot.setDatasets(new Datasets(xyDatasets));
    XYPlotRenderer plotRenderer = new XYPlotRenderer();
    plot.setPlotRenderer(plotRenderer);
    chart.setPlot(plot);
View Full Code Here

Examples of org.timepedia.chronoscope.client.Chart

  public void onViewReady(View view) {
    plot.init(view);
   
    // configure chart
    chart = new Chart();
    chart.setPlot(plot);
    chart.setView(view);
    view.setChart(chart);
//    chart.init(view, plot);
    redraw();
View Full Code Here

Examples of org.wicketstuff.googlecharts.Chart

        };

        ChartProvider provider = new ChartProvider(new Dimension(250, 100), ChartType.PIE_3D, data);
        provider.setPieLabels(new String[]{"Hello", "World"});

        add(new Chart("helloWorld", provider));

        data = new AbstractChartData() {

            public double[][] getData() {
                return new double[][]{{34, 30, 38, 38, 41, 22, 41, 44, 38, 29}};
            }
        };

        provider = new ChartProvider(new Dimension(200, 125), ChartType.LINE, data);

        ChartAxis axis = new ChartAxis(ChartAxisType.BOTTOM);
        axis.setLabels(new String[]{"Mar", "Apr", "May", "June", "July"});
        provider.addAxis(axis);

        axis = new ChartAxis(ChartAxisType.LEFT);
        axis.setLabels(new String[]{null, "50 Kb"});
        provider.addAxis(axis);

        add(new Chart("lineHelloWorld", provider));

        data = new AbstractChartData(ChartDataEncoding.TEXT, 100) {

            public double[][] getData() {
                return new double[][]{
                            {0, 30, 60, 70, 90, 95, 100},
                            {20, 30, 40, 50, 60, 70, 80},
                            {10, 30, 40, 45, 52},
                            {100, 90, 40, 20, 10},
                            null,
                            {5, 33, 50, 55, 7}
                        };
            }
        };

        provider = new ChartProvider(new Dimension(200, 125), ChartType.LINE_XY, data);
        provider.setColors(new Color[]{Color.decode("#3072F3"), Color.RED, Color.decode("#00aaaa")});
        provider.setLineStyles(new LineStyle[]{new LineStyle(2, 4, 1)});

        provider.addShapeMarker(new ShapeMarker(MarkerType.SQUARE, Color.RED, 0, -1, 5));
        provider.addShapeMarker(new ShapeMarker(MarkerType.SQUARE, Color.BLUE, 1, -1, 5));
        provider.addShapeMarker(new ShapeMarker(MarkerType.SQUARE, Color.decode("#00aa00"), 2, -1, 5));

        add(new Chart("lineChart", provider));

        data = new AbstractChartData() {

            public double[][] getData() {
                return new double[][]{
                            {7, 4, 11, 11},
                            {22, 14, 17, 11}
                        };
            }
        };

        provider = new ChartProvider(new Dimension(200, 125), ChartType.BAR_HORIZONTAL_SET, data);
        provider.setColors(new Color[]{Color.RED, Color.decode("#00aa00")});

        add(new Chart("horizontalBarSet", provider));

        data = new AbstractChartData() {

            public double[][] getData() {
                return new double[][]{{34, 30, 38, 38, 41}};
            }
        };

        provider = new ChartProvider(new Dimension(200, 125), ChartType.BAR_HORIZONTAL_SET, data);

        add(new Chart("horizontalScaledBar", provider));

        data = new AbstractChartData(ChartDataEncoding.TEXT, 100) {

            public double[][] getData() {
                return new double[][]{{100, 80, 60, 30, 30, 30, 10}};
            }
        };

        provider = new ChartProvider(new Dimension(200, 100), ChartType.VENN, data);

        add(new Chart("venn", provider));

        data = new AbstractChartData() {

            public double[][] getData() {
                return new double[][]{{42, 43, 41, 38, 31, 24, 14, 13, 14, 12,
                                4, 1, 0, 10, 15, 14, 16, 21, 19, 23, 25, 30, 31, 29, 27, 20,
                                29, 33, 28, 42, 44, 43, 50, 47, 47, 50, 55, 61, 55, 52, 46,
                                42, 41, 41, 40, 37, 31, 33, 33, 36, 42}};
            }
        };

        provider = new ChartProvider(new Dimension(200, 125), ChartType.LINE, data);
        provider.setColors(new Color[]{Color.RED});
        provider.setLineStyles(new LineStyle[]{new LineStyle(4, 3, 0)});

        provider.setBackgroundFill(new SolidFill(Color.decode("#EFEFEF")));
        provider.setChartFill(new LinearGradientFill(45,
                new Color[]{Color.WHITE, Color.decode("#76A4FB")}, new double[]{0, 0.75}));

        axis = new ChartAxis(ChartAxisType.BOTTOM);
        axis.setLabels(new String[]{"1", "2", "3", "4", "5"});
        provider.addAxis(axis);

        axis = new ChartAxis(ChartAxisType.LEFT);
        axis.setLabels(new String[]{"0", "50", "100"});
        provider.addAxis(axis);

        add(new Chart("backgrounds", provider));

        data = new AbstractChartData(ChartDataEncoding.TEXT, 100) {

            public double[][] getData() {
                return new double[][]{
                            {12, 4, 4, 8, 24, 28, 24, 28, 12, 12, 16},
                            {28, 28, 96, 40, 16, 32, 12, 24, 100, 44, 16, 8},
                            {36, 40, 40, 24, 56, 72, 12, 8, 4, 48, 40, 12}
                        };
            }
        };

        provider = new ChartProvider(new Dimension(200, 125), ChartType.LINE, data);
        provider.setColors(new Color[]{Color.GREEN, Color.BLUE, Color.RED});
        provider.setLegend(new String[]{"2005", "2006", "2007"});
        provider.setLineStyles(new LineStyle[]{
                    new LineStyle(3, 2, 0),
                    new LineStyle(3, 2, 0),
                    new LineStyle(3, 2, 0)
                });
        provider.setBackgroundFill(new SolidFill(new Color(0, 0, 0, 0)));

        axis = new ChartAxis(ChartAxisType.BOTTOM);
        axis.setLabels(new String[]{"J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"});
        provider.addAxis(axis);

        axis = new ChartAxis(ChartAxisType.LEFT);
        axis.setLabels(new String[]{null, "5", "10", "15", "20", "25"});
        provider.addAxis(axis);

        add(new Chart("alex", provider));
    }
View Full Code Here

Examples of org.zkoss.poi.ss.usermodel.Chart

          chartX = c;
          break;
       
      }
    }
    Chart chart = chartX.getChart();
    if (chart != null) {
      int dx1 = (Integer) data.get("dx1");
      int dy1 = (Integer) data.get("dy1");
      int dx2 = (Integer) data.get("dx2");
      int dy2 = (Integer) data.get("dy2");
View Full Code Here

Examples of org.zkoss.zul.Chart

    scale.setText("Users");
    scale.newRange(450, 500, "#FF0000", 0.83, 0.89);
    scale.newRange(360, 450, "#FFC426", 0.83, 0.89);
    scale.setValue(val);

    final Chart chart = new Chart();
    chart.setType("dial");
    chart.setWidth("228px");
    chart.setHeight("200px");
    chart.setThreeD(true);
    chart.setFgAlpha(128);
    chart.setBgColor("#FFFFFF");
    chart.setModel(dialmodel);
    chart.setParent(div);

  }
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.