本文整理汇总了Java中org.primefaces.model.chart.PieChartModel类的典型用法代码示例。如果您正苦于以下问题:Java PieChartModel类的具体用法?Java PieChartModel怎么用?Java PieChartModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PieChartModel类属于org.primefaces.model.chart包,在下文中一共展示了PieChartModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void createPieModel() {
pieModelUS = new PieChartModel();
pieModelUK = new PieChartModel();
for(AccountSummary obj:accountsInfo){
pieModelUS.set(obj.getAccountType(),new Double(obj.getBalanceUS()));
pieModelUK.set(obj.getAccountType(),new Double(obj.getBalanceUK()));
}
pieModelUS.setTitle("USD Marketvalue");
pieModelUS.setLegendPosition("w");
pieModelUS.setShowDataLabels(true);
pieModelUK.setTitle("UK Marketvalue");
pieModelUK.setLegendPosition("e");
pieModelUK.setFill(false);
pieModelUK.setShowDataLabels(true);
pieModelUK.setSliceMargin(5);
//pieModelUK.setDiameter(150);
}
示例2: initPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void initPieModel() {
/* 80 */ this.pieModel = new PieChartModel();
/* */
/* 82 */ this.pieModel.set("Brand 1", Integer.valueOf(540));
/* 83 */ this.pieModel.set("Brand 2", Integer.valueOf(325));
/* 84 */ this.pieModel.set("Brand 3", Integer.valueOf(702));
/* 85 */ this.pieModel.set("Brand 4", Integer.valueOf(421));
/* */
/* 87 */ this.pieModel.setExtender("skinPie");
/* */ }
示例3: preRender
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public void preRender() {
this.model = new LineChartModel();
this.model.setTitle("Pedidos criados");
this.model.setAnimate(true);
this.model.setLegendPosition("e");
this.model.getAxes().put(AxisType.X, new CategoryAxis("Datas"));
Axis yAxis = this.model.getAxis(AxisType.Y);
yAxis.setLabel("Valores");
yAxis.setMin(0);
// yAxis.setMax(1100);
adicionarSeries("Todos os pedidos", null);
adicionarSeries("Meus pedidos", this.usuarioLogado.getUsuario());
// ModelPie
this.modelPie = new PieChartModel();
Map<String, BigDecimal> valoresPorUsuario = this.pedidos.valoresTotaisPorVendedor();
for (String usuario : valoresPorUsuario.keySet()) {
this.modelPie.set(usuario, valoresPorUsuario.get(usuario));
}
this.modelPie.setTitle("Totais por Vendedor");
this.modelPie.setLegendPosition("w");
this.modelPie.setShowDataLabels(true);
this.modelPie.setShadow(true);
}
示例4: preencherDadosGrafico
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void preencherDadosGrafico() {
dadosGrafico = new PieChartModel();
int contador = 1;
for (RecursoDTO recurso : dados) {
String descricaoTopico = criarDescricao(contador, recurso);
int participacoes = recurso.getQuantidade();
totalDePostagens += participacoes;
dadosGrafico.set(descricaoTopico, participacoes);
contador++;
}
}
示例5: createPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void createPieModel() {
pieModel = new PieChartModel();
for (Hotel h : hotelService.listHotel()) {
if (h.getComments().size() != 0) {
pieModel.set(h.getName(), h.getComments().size());
}
}
}
示例6: PrimeChartBean
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PrimeChartBean(){
pieModel1 = new PieChartModel();
pieModel1.set("Brand 1", 540);
pieModel1.set("Brand 2", 325);
pieModel1.set("Brand 3", 702);
pieModel1.set("Brand 4", 421);
pieModel1.setTitle("Simple Pie");
pieModel1.setLegendPosition("w");
}
示例7: createPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void createPieModel()
{
pieModel = new PieChartModel();
pieModel.set("Brand A", 540);
pieModel.set("Brand B", 325);
pieModel.set("Brand C", 702);
pieModel.set("Brand D", 421);
}
示例8: createPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void createPieModel()
{
pieModel = new PieChartModel();
pieModel.set("Brand 1", 540);
pieModel.set("Brand 2", 325);
pieModel.set("Brand 3", 702);
pieModel.set("Brand 4", 421);
}
示例9: getLivePieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PieChartModel getLivePieModel() {
int random1 = (int)(Math.random() * 1000);
int random2 = (int)(Math.random() * 1000);
livePieModel.getData().put("Candidate 1", random1);
livePieModel.getData().put("Candidate 2", random2);
return livePieModel;
}
示例10: createPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
private void createPieModel() {
pieModel = new PieChartModel();
pieModel.set("Brand 1", 540);
pieModel.set("Brand 2", 325);
pieModel.set("Brand 3", 702);
pieModel.set("Brand 4", 421);
}
示例11: getPieModel
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PieChartModel getPieModel() {
/* 44 */ return this.pieModel;
/* */ }
示例12: getPieModel1
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PieChartModel getPieModel1() {
return pieModel1.getPoll();
}
示例13: getPoll
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PieChartModel getPoll(){
return pieModel1;
}
示例14: getPieModel1
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PieChartModel getPieModel1() {
return pieModel1;
}
示例15: getModelPie
import org.primefaces.model.chart.PieChartModel; //导入依赖的package包/类
public PieChartModel getModelPie() {
return this.modelPie;
}