Example usage for com.google.gwt.visualization.client.visualizations AreaChart PACKAGE

List of usage examples for com.google.gwt.visualization.client.visualizations AreaChart PACKAGE

Introduction

In this page you can find the example usage for com.google.gwt.visualization.client.visualizations AreaChart PACKAGE.

Prototype

String PACKAGE

To view the source code for com.google.gwt.visualization.client.visualizations AreaChart PACKAGE.

Click Source Link

Usage

From source file:com.google.speedtracer.latencydashboard.client.MarkTimelineLatencyDashboard.java

License:Apache License

private void createDashboardUi() {
    refreshButton.getElement().getStyle().setMarginLeft(3, Unit.EM);
    refreshButton.setEnabled(false);/*ww w. j av a 2 s  .c  o  m*/
    refreshButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            populateDashboard();
        }
    });

    VisualizationUtils.loadVisualizationApi(new Runnable() {
        /**
         * Load data from the server.
         */
        public void run() {
            refreshButton.setEnabled(true);
            createCharts();
            populateDashboard();
            RootPanel.get().add(refreshButton);
            Window.addResizeHandler(new ResizeHandler() {

                public void onResize(ResizeEvent event) {
                    populateDashboard();
                }

            });
        }
    }, AreaChart.PACKAGE, LineChart.PACKAGE, PieChart.PACKAGE, Gauge.PACKAGE);
}