문제

I have tried out the visualization api using http://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted

But, I wanted to create charts with new visualization API like https://developers.google.com/chart/interactive/docs/gallery/piechart

Is it possible to achieve this using GWTP Uibinders or do I need to use any other ways to achieve this.

Thanks In Advance, Bennet.

도움이 되었습니까?

해결책

It can be done exactl like in this question: How to integrate GWT UIBinder with Canvas?

There is only one difference:

You will need to load a Library at runtime first (I think it is a PlainJavaScript, wrapped by GWT):

Runnable onLoadCallback = new Runnable() {
  public void run() {
    Panel panel = RootPanel.get();

    // Create a pie chart visualization.
    PieChart pie = new PieChart(createTable(), createOptions());

    pie.addSelectHandler(createSelectHandler(pie));
    panel.add(pie);
  }
};
VisualizationUtils.loadVisualizationApi(onLoadCallback, PieChart.PACKAGE);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top