• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ChartPackage类的典型用法和代码示例

java 6次浏览

本文整理汇总了Java中com.googlecode.gwt.charts.client.ChartPackage的典型用法代码示例。如果您正苦于以下问题:Java ChartPackage类的具体用法?Java ChartPackage怎么用?Java ChartPackage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ChartPackage类属于com.googlecode.gwt.charts.client包,在下文中一共展示了ChartPackage类的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initialize

点赞 3

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			chart = new LineChart();
			cardContent.add(chart);
			draw();
			Timer timer = new Timer() {
			      public void run() {
			        draw2();
			      }
			    };
			timer.schedule(2000);
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:20,
代码来源:MaterialColoredLineChart.java

示例2: createVisualization

点赞 3

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/** 
 * Creates the pie chart visualization and returns it in a Widget
 * @return Widget The movie collection visualized in pie chart form
 */
public Widget createVisualization() {
	focusPanel = new FocusPanel();

	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			pieChart = new PieChart();
			focusPanel.setWidget(pieChart);
			draw();
		}
	});
	return focusPanel;
}
 

开发者ID:ratheile,
项目名称:sweng15,
代码行数:20,
代码来源:PieChartVisualizer.java

示例3: createVisualization

点赞 3

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/** 
 * Creates a table visualization and returns it in a Widget.
 * @return Widget The movie collection visualized in table form
 */
public Widget createVisualization() {
	returnPanel = new FocusPanel();
	
	ChartLoader chartLoader = new ChartLoader(ChartPackage.TABLE);
	chartLoader.loadApi(new Runnable() {
		@Override
		public void run() {
			table = new Table();
			returnPanel.setWidget(table);
			draw();
		}
	});
	
	return returnPanel;
}
 

开发者ID:ratheile,
项目名称:sweng15,
代码行数:20,
代码来源:TableVisualizer.java

示例4: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			chart = new CandlestickChart();
			cardContent.add(chart);
			draw();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:14,
代码来源:MaterialCandleStick.java

示例5: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			chart = new BarChart();
			cardContent.add(chart);
			
			// Prepare the data with loop inside to populate the initial data
			setLoop();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:16,
代码来源:MaterialBarChart.java

示例6: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			chart = new BubbleChart();
			cardContent.add(chart);
			draw();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:14,
代码来源:MaterialBubbleChart.java

示例7: initializeRegularChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initializeRegularChart() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			PieChart chart = new PieChart();
			chart.setWidth("100%");
			chart.setHeight("100%");
			cardContent.add(chart);
			DataTable dataTable = DataTable.create();
			dataTable.addColumn(ColumnType.STRING, "Task");
			dataTable.addColumn(ColumnType.NUMBER, "Hours per Day");
			dataTable.addRows(5);
			dataTable.setValue(0, 0, "Work");
			dataTable.setValue(0, 1, 11);
			dataTable.setValue(1, 0, "Sleep");
			dataTable.setValue(1, 1, 7);
			dataTable.setValue(2, 0, "Watch TV");
			dataTable.setValue(2, 1, 3);
			dataTable.setValue(3, 0, "Eat");
			dataTable.setValue(3, 1, 2);
			dataTable.setValue(4, 0, "Commute");
			dataTable.setValue(4, 1, 1);

			PieOpt opt = new PieOpt();
			opt.setColors("2196f3", "42a5f5", "64b5f6", "90caf9", "bbdefb");

			chart.draw(dataTable, opt.get());
		}
	});

}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:34,
代码来源:MaterialPieChart.java

示例8: initializeDonutChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initializeDonutChart() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			PieChart chart = new PieChart();
			chart.setWidth("100%");
			chart.setHeight("100%");
			cardContent.add(chart);
			DataTable dataTable = DataTable.create();
			dataTable.addColumn(ColumnType.STRING, "Task");
			dataTable.addColumn(ColumnType.NUMBER, "Hours per Day");
			dataTable.addRows(5);
			dataTable.setValue(0, 0, "Work");
			dataTable.setValue(0, 1, 11);
			dataTable.setValue(1, 0, "Sleep");
			dataTable.setValue(1, 1, 7);
			dataTable.setValue(2, 0, "Watch TV");
			dataTable.setValue(2, 1, 3);
			dataTable.setValue(3, 0, "Eat");
			dataTable.setValue(3, 1, 2);
			dataTable.setValue(4, 0, "Commute");
			dataTable.setValue(4, 1, 1);

			PieOpt opt = new PieOpt();
			opt.setColors("2196f3", "42a5f5", "64b5f6", "90caf9", "bbdefb");
			opt.setHole(0.8);

			chart.draw(dataTable, opt.get());
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:34,
代码来源:MaterialPieChart.java

示例9: initialize3DChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize3DChart() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			PieChart chart = new PieChart();
			chart.setWidth("100%");
			chart.setHeight("100%");
			cardContent.add(chart);
			DataTable dataTable = DataTable.create();
			dataTable.addColumn(ColumnType.STRING, "Task");
			dataTable.addColumn(ColumnType.NUMBER, "Hours per Day");
			dataTable.addRows(5);
			dataTable.setValue(0, 0, "Work");
			dataTable.setValue(0, 1, 11);
			dataTable.setValue(1, 0, "Sleep");
			dataTable.setValue(1, 1, 7);
			dataTable.setValue(2, 0, "Watch TV");
			dataTable.setValue(2, 1, 3);
			dataTable.setValue(3, 0, "Eat");
			dataTable.setValue(3, 1, 2);
			dataTable.setValue(4, 0, "Commute");
			dataTable.setValue(4, 1, 1);

			PieOpt opt = new PieOpt();
			opt.setColors("2196f3", "42a5f5", "64b5f6", "90caf9", "bbdefb");
			opt.setIs3D(true);

			chart.draw(dataTable, opt.get());
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:34,
代码来源:MaterialPieChart.java

示例10: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			chart = new AreaChart();
			cardContent.add(chart);
			// Prepare the data with loop inside to populate the initial data 
			setLoop();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:14,
代码来源:MaterialAreaChart.java

示例11: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.GAUGE);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			gauge = new Gauge();
			cardContent.add(gauge);
			draw();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:14,
代码来源:MaterialGauge.java

示例12: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			chart = new ComboChart();
			cardContent.add(chart);
			draw();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:14,
代码来源:MaterialComboCharts.java

示例13: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
	ChartLoader chartLoader = new ChartLoader(ChartPackage.GEOCHART);
	chartLoader.loadApi(new Runnable() {

		@Override
		public void run() {
			// Create and attach the chart
			geoChart = new GeoChart();
			cardContent.add(geoChart);
			draw();
		}
	});
}
 

开发者ID:GwtMaterialDesign,
项目名称:gwt-material-demo,
代码行数:14,
代码来源:MaterialGeoChart.java

示例14: createVisualization

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/** 
 * Creates the bar chart visualization and returns it in a Widget
 * @return Widget Containing the movie collection visualized in bar chart form
 */
public Widget createVisualization() {
	focusPanel = new FocusPanel();

	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {
		@Override
		public void run() {
			columnChart = new ColumnChart();
			focusPanel.setWidget(columnChart);
			draw();
		}
	});
	return focusPanel;
}
 

开发者ID:ratheile,
项目名称:sweng15,
代码行数:19,
代码来源:BarChartVisualizer.java

示例15: createVisualization

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/** 
 * Creates the histogram visualization of movie lengths and returns it in a Widget
 * @return Widget The movie collection visualized in histogram form
 */
public Widget createVisualization() {
	focusPanel = new FocusPanel();
	
	ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
	chartLoader.loadApi(new Runnable() {
		@Override
		public void run() {
			histogram = new Histogram();
			focusPanel.setWidget(histogram);
			draw();
		}
	});
	return focusPanel;
}
 

开发者ID:ratheile,
项目名称:sweng15,
代码行数:19,
代码来源:HistogramVisualizer.java

示例16: createVisualization

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/** 
 * Creates the world map visualization and returns it in a Widget
 * @return Widget The movie collection visualized in world map form
 */
public Widget createVisualization() {
	focusPanel = new FocusPanel();
	ChartLoader chartLoader = new ChartLoader(ChartPackage.GEOCHART);
	chartLoader.loadApi(new Runnable() {
		@Override
		public void run() {
			geoChart = new GeoChart();
			focusPanel.setWidget(geoChart);
			draw();
		}
	});
	return focusPanel;
}
 

开发者ID:ratheile,
项目名称:sweng15,
代码行数:18,
代码来源:WorldMapVisualizer.java

示例17: MonitoringDynamicLinesChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
public MonitoringDynamicLinesChart(String yColumnName, String xColumnname, String title) {
    this.yColumnName = yColumnName;
    this.xColumnname = xColumnname;
    this.title = title;

    ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
    chartLoader.loadApi(new Runnable() {

        @Override
        public void run() {
            try {
                // Create and attach the chart
                chart = new LineChart();
                chart.setHeight("100%");
                fp.add(chart);
                initilized = true;
                if (chartFeeds != null) {
                    updateChart(lineTypes, chartFeeds, lastRowAsColumn);
                }

            } catch (Exception e) {
                Log.error(e.getMessage(), e);
            }
        }
    });
    initWidget(fp);
}
 

开发者ID:armangal,
项目名称:SmartMonitoring,
代码行数:28,
代码来源:MonitoringDynamicLinesChart.java

示例18: initialize

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
private void initialize() {
    ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
    chartLoader.loadApi(new Runnable() {

        @Override
        public void run() {
            // Create and attach the chart
            chart = new PieChart();
            chart.setWidth("100px");
            chart.setHeight("100px");
            fp.add(chart);
            draw();
        }
    });
}
 

开发者ID:armangal,
项目名称:SmartMonitoring,
代码行数:16,
代码来源:MonitoringPieChart.java

示例19: MonitoringLineChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
public MonitoringLineChart(ILineType[] lineTypes, String yColumnName, String xColumnname, String title) {
    this.lineTypes = lineTypes;
    this.yColumnName = yColumnName;
    this.xColumnname = xColumnname;
    this.title = title;

    ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
    chartLoader.loadApi(new Runnable() {

        @Override
        public void run() {
            try {
                // Create and attach the chart
                chart = new LineChart();
                chart.setHeight("100%");
                fp.add(chart);
                initilized = true;
                if (chartFeeds != null) {
                    updateChart(chartFeeds, lastRowAsColumn);
                }

            } catch (Exception e) {
                Log.error(e.getMessage(), e);
            }
        }
    });
    initWidget(fp);
}
 

开发者ID:armangal,
项目名称:SmartMonitoring,
代码行数:29,
代码来源:MonitoringLineChart.java

示例20: updateChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/**
 * Requests data from the server
 * @param dateRange
 * @param account
 */
public static void updateChart(final String dateRange, final String account) {
    cardContent.clear();

    String url = "";
    String screenName = account;

    sourcesLoader.setVisible(true);

    url = JSON_URL + "/" + screenName + dateRange;

    sourcesLoader.setVisible(true);

    JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
    // Set timeout for 30 seconds (30000 milliseconds)
    jsonp.setTimeout(30000);
    jsonp.requestObject(url, new AsyncCallback<SourceSummary>() {

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Failure: " + caught.getMessage());
            sourcesLoader.setVisible(false);
        }

        @Override
        public void onSuccess(SourceSummary result) {
            // Create a callback to be called when the visualization API
            // has been loaded.
            sourceSummary = result.getSourceSummary();
            // Create the API Loader
            ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
            chartLoader.loadApi(new Runnable() {
                @Override
                public void run() {
                    cardContent.add(getPieChart());
                    drawPieChart(sourceSummary);
                    sourcesLoader.setVisible(false);
                }
            });


        }

    });
}
 

开发者ID:WSDOT,
项目名称:social-analytics,
代码行数:50,
代码来源:SourcesPieChart.java

示例21: updateTweetsChart

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/**
 * Requests tweet and mention counts from server for a given date range and account.
 * @param dateRange
 * @param account : Can be "All"
 */
public static void updateTweetsChart(String dateRange, String account) {
    tweetContent.clear();
    tweetLabel.clear();
    tweetLabel.setVisible(true);
    tweetsLoader.setVisible(true);

    final String url;
    String screenName = account;

    url = JSON_URL + "/" + screenName + dateRange;

    JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
    // Set timeout for 30 seconds (30000 milliseconds)
    jsonp.setTimeout(30000);
    jsonp.requestObject(url, new AsyncCallback<TweetSummary>() {

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Failure: " + caught.getMessage());
            tweetsLoader.setVisible(false);
        }

        @Override
        public void onSuccess(TweetSummary result) {
            // Create a callback to be called when the visualization API
            // has been loaded.
            tweetSummary = result.getTweetSummary();
            // Create the API Loader
            ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
            chartLoader.loadApi(new Runnable() {
                @Override
                public void run() {
                    tweetContent.clear();
                    tweetLabel.clear();
                    tweetContent.add(getTweetsChart());
                    drawTweetsChart(tweetSummary);
                    tweetsLoader.setVisible(false);
                }
            });
        }
    });
}
 

开发者ID:WSDOT,
项目名称:social-analytics,
代码行数:48,
代码来源:SummaryChart.java

示例22: updateChartFollowers

点赞 2

import com.googlecode.gwt.charts.client.ChartPackage; //导入依赖的package包/类
/**
 *
 * Requests follower counts from server for a given date range and account.
 *
 * @param dateRange
 * @param account : Can be "all"
 */
public static void updateChartFollowers(String dateRange, String account) {

    followerContent.clear();
    followersLoader.setVisible(true);
    followersLabel.clear();
    followersLabel.setVisible(true);

    String screenName = account;
    String url = "";

    url = JSON_URL + "/followers/" + screenName + dateRange;

    JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
    // Set timeout for 30 seconds (30000 milliseconds)
    jsonp.setTimeout(30000);
    jsonp.requestObject(url, new AsyncCallback<FollowerSummary>() {

        @Override
        public void onFailure(Throwable caught) {
            Window.alert("Failure: " + caught.getMessage());
            followersLoader.setVisible(false);
        }

        @Override
        public void onSuccess(FollowerSummary result) {
            // Create a callback to be called when the visualization API
            // has been loaded.
            followerSummary = result.getFollowerSummary();

            // Create the API Loader
            ChartLoader chartLoader = new ChartLoader(ChartPackage.CORECHART);
            chartLoader.loadApi(new Runnable() {
                @Override
                public void run() {
                    followerContent.add(getFollowersChart());
                    drawFollowersChart(followerSummary);
                    followersLoader.setVisible(false);
                    followersLabel.setVisible(true);
                }
            });
        }
    });
}
 

开发者ID:WSDOT,
项目名称:social-analytics,
代码行数:51,
代码来源:SummaryChart.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)