Search in sources :

Example 1 with Chart

use of com.extjs.gxt.charts.client.Chart in project activityinfo by bedatadriven.

the class ChartOFCView method createChart.

private void createChart() {
    chart = new Chart(GWT.getModuleBaseURL() + "/gxt231/chart/open-flash-chart.swf");
    chart.setBorders(false);
    chart.setChartModel(chartModel);
    if (!chart.isLoaded()) {
        this.el().mask(I18N.CONSTANTS.loading());
        chart.addListener(Events.Ready, new Listener<BaseEvent>() {

            @Override
            public void handleEvent(BaseEvent be) {
                chart.removeListener(Events.Ready, this);
                ChartOFCView.this.el().unmask();
                ChartOFCView.this.chart.repaint();
            }
        });
    }
    add(chart, new MarginData(20));
}
Also used : MarginData(com.extjs.gxt.ui.client.widget.layout.MarginData) BaseEvent(com.extjs.gxt.ui.client.event.BaseEvent) PieChart(com.extjs.gxt.charts.client.model.charts.PieChart) Chart(com.extjs.gxt.charts.client.Chart) LineChart(com.extjs.gxt.charts.client.model.charts.LineChart) FilledBarChart(com.extjs.gxt.charts.client.model.charts.FilledBarChart)

Aggregations

Chart (com.extjs.gxt.charts.client.Chart)1 FilledBarChart (com.extjs.gxt.charts.client.model.charts.FilledBarChart)1 LineChart (com.extjs.gxt.charts.client.model.charts.LineChart)1 PieChart (com.extjs.gxt.charts.client.model.charts.PieChart)1 BaseEvent (com.extjs.gxt.ui.client.event.BaseEvent)1 MarginData (com.extjs.gxt.ui.client.widget.layout.MarginData)1