本文整理汇总了Java中com.googlecode.gwt.charts.client.corechart.PieChartOptions类的典型用法代码示例。如果您正苦于以下问题:Java PieChartOptions类的具体用法?Java PieChartOptions怎么用?Java PieChartOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PieChartOptions类属于com.googlecode.gwt.charts.client.corechart包,在下文中一共展示了PieChartOptions类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: drawPieChart
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
/**
* Updates the pue chart with new data
* @param sentimentSummary
*/
private static void drawPieChart(JsArray<SentimentSummary> sentimentSummary) {
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, "Sentiment");
data.addColumn(ColumnType.NUMBER, "Count");
data.addRows(sentimentSummary.length());
int j = sentimentSummary.length();
for (int i = 0; i < j; i++) {
data.setValue(i, 0, sentimentSummary.get(i).getId());
data.setValue(i, 1, sentimentSummary.get(i).getValue());
}
Legend legend = Legend.create();
legend.setPosition(LegendPosition.NONE);
PieChartOptions options = PieChartOptions.create();
options.setWidth(500);
options.setHeight(400);
ChartArea area = ChartArea.create();
area.setTop(50);
area.setLeft(25);
options.setChartArea(area);
options.setLegend(legend);
options.setColors("BDBDBD", "26A69A", "FF6E40");
pieChart.draw(data, options);
}
开发者ID:WSDOT,项目名称:social-analytics,代码行数:34,代码来源:SentimentPieChart.java
示例2: drawPieChart
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
/**
* Updates the pue chart with new data
* @param sourcesSummary
*/
private static void drawPieChart(JsArray<SourceSummary> sourcesSummary) {
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, "Client");
data.addColumn(ColumnType.NUMBER, "Count");
data.addRows(sourcesSummary.length());
int j = sourcesSummary.length();
for (int i = 0; i < j; i++) {
data.setValue(i, 0, sourcesSummary.get(i).getId());
data.setValue(i, 1, sourcesSummary.get(i).getValue());
}
Legend legend = Legend.create();
legend.setPosition(LegendPosition.NONE);
PieChartOptions options = PieChartOptions.create();
options.setWidth(500);
options.setHeight(400);
ChartArea area = ChartArea.create();
area.setTop(50);
area.setLeft(25);
options.setChartArea(area);
options.setLegend(legend);
options.setColors("00796b", "00897b", "009688", "26a69a", "4db6ac", "80cbc4", "b2dfdb");
pieChart.draw(data, options);
}
开发者ID:WSDOT,项目名称:social-analytics,代码行数:34,代码来源:SourcesPieChart.java
示例3: draw
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
private void draw() {
// Prepare the data
DataTable dataTable = DataTable.create();
dataTable.addColumn(ColumnType.STRING, "Task");
dataTable.addColumn(ColumnType.NUMBER, "Hours per Day");
dataTable.addRows(2);
dataTable.setValue(0, 0, "Work");
dataTable.setValue(0, 1, 11);
dataTable.setValue(1, 0, "Sleep");
dataTable.setValue(1, 1, 7);
// Set options
PieChartOptions options = PieChartOptions.create();
options.setBackgroundColor("#f0f0f0");
// options.setColors(colors);
options.setFontName("Tahoma");
options.setIs3D(true);
options.setPieResidueSliceColor("#000000");
options.setPieResidueSliceLabel("Others");
options.setSliceVisibilityThreshold(0.1);
options.setTitle("So, how was your day?");
options.setHeight(100);
options.setWidth(100);
// Draw the chart
chart.draw(dataTable, options);
}
开发者ID:armangal,项目名称:SmartMonitoring,代码行数:29,代码来源:MonitoringPieChart.java
示例4: PieOpt
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
private PieOpt() {
_this = PieChartOptions.create();
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:4,代码来源:MaterialPieChart.java
示例5: get
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
public PieChartOptions get() {
return _this;
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:4,代码来源:MaterialPieChart.java
示例6: setHole
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
private final native void setHole(PieChartOptions chartOptions, double d) /*-{
chartOptions.pieHole = d;
}-*/;
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:4,代码来源:MaterialPieChart.java
示例7: PieChartOptionsWrapper
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
private PieChartOptionsWrapper() {
_this = PieChartOptions.create();
}
开发者ID:kiegroup,项目名称:appformer,代码行数:4,代码来源:PieChartOptionsWrapper.java
示例8: get
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
public PieChartOptions get() {
return _this;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:4,代码来源:PieChartOptionsWrapper.java
示例9: setHole
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
private final native void setHole(PieChartOptions chartOptions, double d) /*-{
chartOptions.pieHole = d;
}-*/;
开发者ID:kiegroup,项目名称:appformer,代码行数:4,代码来源:PieChartOptionsWrapper.java
示例10: draw
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
/**
* Creates the pie chart visualization, using the Google Charts framework.
*/
protected void draw() {
// Determine movie count of every genre
HashMap<String, Integer> genreMap = new HashMap<String, Integer>();
for (Movie m : movieCollection.getMovies()) {
for (String s : m.getGenre()) {
if (genreMap.containsKey(s)) {
int tmpCount = genreMap.get(s);
tmpCount++;
genreMap.put(s, tmpCount);
} else {
genreMap.put(s, 1);
}
}
}
// Create DataTable
DataTable dataTable = DataTable.create();
dataTable.addColumn(ColumnType.STRING, "Genre");
dataTable.addColumn(ColumnType.NUMBER, "Genre Percentage");
dataTable.addRows(genreMap.size());
// Fill DataTable
Set<String> genreNames = genreMap.keySet();
int i = 0;
Iterator<String> iter = genreNames.iterator();
while(iter.hasNext()) {
String genre = iter.next();
dataTable.setValue(i, 0, genre);
// The percentage of the genre is automatically calculated by the framework
dataTable.setValue(i, 1, genreMap.get(genre));
i++;
}
// PieChart options
PieChartOptions options = PieChartOptions.create();
options.setTitle("Genre Distribution by Percent");
// Languages with less than 2.5 percent are collected under the category "Other"
options.setPieResidueSliceColor("#505050");
options.setPieResidueSliceLabel("Other");
options.setSliceVisibilityThreshold(0.025);
// Display options
options.setFontName("Arial");
options.setHeight(400);
ChartArea area = ChartArea.create();
area.setLeft(0);
area.setTop(55);
area.setHeight(300);
options.setChartArea(area);
// Draw the chart
pieChart.draw(dataTable, options);
}
开发者ID:ratheile,项目名称:sweng15,代码行数:56,代码来源:GenrePieChartVisualizer.java
示例11: draw
import com.googlecode.gwt.charts.client.corechart.PieChartOptions; //导入依赖的package包/类
/**
* Creates the pie chart visualization, using the Google Charts framework.
*/
protected void draw() {
// Determine movie count of every language
HashMap<String, Integer> languageMap = new HashMap<String, Integer>();
for (Movie m : movieCollection.getMovies()) {
for (String s : m.getLanguage()) {
if (languageMap.containsKey(s)) {
int tmpCount = languageMap.get(s);
tmpCount++;
languageMap.put(s, tmpCount);
} else {
languageMap.put(s, 1);
}
}
}
// Create DataTable
DataTable dataTable = DataTable.create();
dataTable.addColumn(ColumnType.STRING, "Language");
dataTable.addColumn(ColumnType.NUMBER, "Language Percentage");
dataTable.addRows(languageMap.size());
// Fill DataTable
Set<String> languageNames = languageMap.keySet();
int i = 0;
Iterator<String> iter = languageNames.iterator();
while(iter.hasNext()) {
String language = iter.next();
dataTable.setValue(i, 0, language);
// The percentage of the genre is automatically calculated by the framework
dataTable.setValue(i, 1, languageMap.get(language));
i++;
}
// PieChart options
PieChartOptions options = PieChartOptions.create();
options.setTitle("Language Distribution by Percent");
// Languages with less than 2.5 percent are collected under the category "Other"
options.setPieResidueSliceColor("#505050");
options.setPieResidueSliceLabel("Other");
options.setSliceVisibilityThreshold(0.025);
// Display options
options.setFontName("Arial");
options.setHeight(400);
ChartArea area = ChartArea.create();
area.setLeft(0);
area.setTop(55);
area.setHeight(300);
options.setChartArea(area);
// Draw the chart
pieChart.draw(dataTable, options);
}
开发者ID:ratheile,项目名称:sweng15,代码行数:56,代码来源:LanguagePieChartVisualizer.java
注:本文中的com.googlecode.gwt.charts.client.corechart.PieChartOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论