当前位置: 首页>>代码示例>>Java>>正文


Java PieChartModel.set方法代码示例

本文整理汇总了Java中org.primefaces.model.chart.PieChartModel.set方法的典型用法代码示例。如果您正苦于以下问题:Java PieChartModel.set方法的具体用法?Java PieChartModel.set怎么用?Java PieChartModel.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.primefaces.model.chart.PieChartModel的用法示例。


在下文中一共展示了PieChartModel.set方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
  }
 
开发者ID:sudheerj,项目名称:primefaces-blueprints,代码行数:22,代码来源:AccountSummaryController.java

示例2: 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++;
		}
		
	}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:15,代码来源:GraficoBean.java

示例3: 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());
        }
    }
}
 
开发者ID:ilya-murzinov,项目名称:hotel-booking,代码行数:9,代码来源:ChartBean.java

示例4: 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");
}
 
开发者ID:tdduy,项目名称:primefaces_component-portlet,代码行数:12,代码来源:PrimeChartBean.java

示例5: 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);
}
 
开发者ID:ova2,项目名称:jsf-portal,代码行数:10,代码来源:ChartBeanB.java

示例6: 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);
}
 
开发者ID:ova2,项目名称:jsf-portal,代码行数:10,代码来源:ChartBeanA.java

示例7: 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);
}
 
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:9,代码来源:ChartBean.java

示例8: createLivePieModel

import org.primefaces.model.chart.PieChartModel; //导入方法依赖的package包/类
private void createLivePieModel() {
    livePieModel = new PieChartModel();

    livePieModel.set("Candidate 1", 540);
    livePieModel.set("Candidate 2", 325);
}
 
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:7,代码来源:ChartBean.java

示例9: getPieChart

import org.primefaces.model.chart.PieChartModel; //导入方法依赖的package包/类
public PieChartModel getPieChart(Long id) {

		List<FieldResult> fieldResults = formController.getFieldResults(id);
		Map<String, Integer> results = new HashMap<String, Integer>();

		for (FieldResult fieldResult : fieldResults) {

			String value = fieldResult.getContent();

			if (results.containsKey(value)) {

				Integer count = results.get(fieldResult.getContent());
				count++;
				results.put(value, count);

			} else {
				results.put(value, 1);
			}

		}

		PieChartModel pieChartModel = new PieChartModel();
		Iterator<Entry<String, Integer>> itr = results.entrySet().iterator();

		while (itr.hasNext()) {
			Entry<String, Integer> entry = itr.next();
			pieChartModel.set(entry.getKey() + " (" + entry.getValue() + ")", entry.getValue());
		}

		return pieChartModel;
	}
 
开发者ID:mahytom,项目名称:liferay-webforms,代码行数:32,代码来源:GraphicBean.java


注:本文中的org.primefaces.model.chart.PieChartModel.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。