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

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

Introduction

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

Prototype

String PACKAGE

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

Click Source Link

Usage

From source file:de.uni_koeln.spinfo.maalr.webapp.ui.admin.client.general.DbManager.java

License:Apache License

private void initVisualization() {
    service.getSystemSummary(new AsyncCallback<SystemSummary>() {

        @Override// w w  w  .  j av  a2 s.  co  m
        public void onFailure(Throwable caught) {
            hideSystemSummary();
        }

        @Override
        public void onSuccess(SystemSummary result) {
            if (result == null) {
                hideSystemSummary();
            } else {
                // Create a callback to be called when the visualization API
                // has been loaded.
                Runnable onLoadCallback = new Runnable() {
                    public void run() {
                        initializeCharts();
                    }

                };
                // Load the visualization api, passing the onLoadCallback to be called
                // when loading is done.
                VisualizationUtils.loadVisualizationApi(onLoadCallback, PieChart.PACKAGE, Gauge.PACKAGE,
                        BarChart.PACKAGE);
            }
        }

        private void hideSystemSummary() {
            chartsColumn.setVisible(false);
            settingsColumn.setSize(12);
        }
    });
}