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


Java ChartSeries.setLabel方法代码示例

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


在下文中一共展示了ChartSeries.setLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fileDownloadStatis

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
public void fileDownloadStatis() {       
    if(selectedDataFileId == 0){
        queryForFile.setDatafileIds(allDataFileIds);
    }else{
        queryForFile.setDatafileIds(Arrays.asList(selectedDataFileId));
    }
    
    logForFile = usageLogSearchService.search(queryForFile);
    statisForFile = new CartesianChartModel();
    ChartSeries downloadAmount = new ChartSeries();
    downloadAmount.setLabel(ResourceBundle.getBundle("Bundle", FacesContext.getCurrentInstance().getViewRoot().getLocale()).getString("log.filedownload.distribute.label"));
    for(Pair<String,Long> pair : logForFile.getDateHistogram()){
        downloadAmount.set(pair.getFirst(), pair.getSecond());
    }
    statisForFile.addSeries(downloadAmount);
}
 
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:17,代码来源:UsageLogStatisPage.java

示例2: initBarModelIndividual

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private BarChartModel initBarModelIndividual() {
    BarChartModel model = new BarChartModel();
    model.setTitle("Desempenho individual");
    model.setAnimate(true);
    model.setLegendPosition("ne");
    Axis yAxis = model.getAxis(AxisType.Y);
    yAxis.setMin(0);
    yAxis.setMax(20);
    
    Pessoa usuario = loginBean.getUsuario();
    
    ChartSeries acertos = new ChartSeries();
    acertos.setLabel("Acertos");
    
    ChartSeries erros = new ChartSeries();
    erros.setLabel("Erros");
    
    for (int i = 0; i < listMaterias.size(); i++) {
   
    	Long acertosMat = pessoaAcertosRepository.getAcertosMateriaIndividual(listMaterias.get(i).getId(), usuario.getId());
    	acertos.set(listMaterias.get(i).getDescricao(), acertosMat);
    	
    	Long errosMat = pessoaAcertosRepository.getErrosMateriaIndividual(listMaterias.get(i).getId(), usuario.getId());
    	erros.set(listMaterias.get(i).getDescricao(), errosMat);
    }
		
    
    model.addSeries(acertos);
    model.addSeries(erros);
     
    return model;
}
 
开发者ID:Corlobin,项目名称:Pecomp,代码行数:33,代码来源:DesempenhoEstudanteBean.java

示例3: initCategoryModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private LineChartModel initCategoryModel() {
    LineChartModel model = new LineChartModel();
 
    ChartSeries alcohol = new ChartSeries();
    alcohol.setLabel("Alcohol");
    alcohol.set("2004", 120);
    alcohol.set("2005", 100);
    alcohol.set("2006", 44);
    alcohol.set("2007", 150);
    alcohol.set("2008", 25);
 
    ChartSeries heat = new ChartSeries();
    heat.setLabel("Heat");
    heat.set("2004", 52);
    heat.set("2005", 60);
    heat.set("2006", 110);
    heat.set("2007", 90);
    heat.set("2008", 120);
 
    model.addSeries(alcohol);
    model.addSeries(heat);
     
    return model;
}
 
开发者ID:bartgerard,项目名称:ubrew_v0.1,代码行数:25,代码来源:MyBrewBean.java

示例4: createTimeBarChart

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createTimeBarChart() {
	Calendar calendar = Calendar.getInstance();
	Date now = calendar.getTime();
	calendar.add(Calendar.HOUR, (NUMBER_OF_HOURS_TO_DISPLAY_ON_BAR_CHART - 1) * -1);
	List<TweetCountPerHour> tweetCountPerHour = analyticsController.getTweetCountPerHour(calendar.getTime(), now);
	tweetCountPerTimeChartModel = new LineChartModel();
	tweetCountPerTimeChartModel.setShowPointLabels(true);
	ChartSeries chartSeries = new ChartSeries();
	chartSeries.setLabel("Tweets");
	tweetCountPerTimeChartModel.setAnimate(true);
	tweetCountPerTimeChartModel.setShadow(false);
	Date endTime;
	for (TweetCountPerHour tweetCount : tweetCountPerHour) {
		calendar = Calendar.getInstance();
		calendar.setTime(tweetCount.getHour());
		calendar.add(Calendar.HOUR, 1);
		endTime = calendar.getTime();
		chartSeries.set(timeFormat.format(tweetCount.getHour()) + " - " + timeFormat.format(endTime),
				tweetCount.getCount());
	}
	tweetCountPerTimeChartModel.addSeries(chartSeries);
	tweetCountPerTimeChartModel.getAxes().put(AxisType.X, new CategoryAxis());
	Axis yAxis = tweetCountPerTimeChartModel.getAxis(AxisType.Y);
	yAxis.setLabel("Tweets");
	yAxis.setMin(0);
}
 
开发者ID:danielgimenes,项目名称:SmashBrosTwitterAnalytics,代码行数:27,代码来源:AnalyticsBean.java

示例5: createDayBarChart

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createDayBarChart() {
	Calendar calendar = Calendar.getInstance();
	Date now = calendar.getTime();
	calendar.add(Calendar.DATE, (NUMBER_OF_DAYS_TO_DISPLAY_ON_BAR_CHART - 1) * -1);
	List<TweetCountPerDay> tweetCountPerDay = analyticsController.getTweetCountPerDay(calendar.getTime(), now);
	tweetCountPerDayChartModel = new BarChartModel();
	tweetCountPerDayChartModel.setShowPointLabels(true);
	ChartSeries chartSeries = new ChartSeries();
	chartSeries.setLabel("Tweets");
	tweetCountPerDayChartModel.setAnimate(true);
	tweetCountPerDayChartModel.setShadow(false);
	Date endTime;
	for (TweetCountPerDay tweetCount : tweetCountPerDay) {
		calendar = Calendar.getInstance();
		calendar.setTime(tweetCount.getDay());
		calendar.add(Calendar.DATE, 1);
		endTime = calendar.getTime();
		chartSeries.set(dateFormat.format(tweetCount.getDay()) + " - " + dateFormat.format(endTime),
				tweetCount.getCount());
	}
	tweetCountPerDayChartModel.addSeries(chartSeries);
	tweetCountPerDayChartModel.getAxes().put(AxisType.X, new CategoryAxis());
	Axis yAxis = tweetCountPerDayChartModel.getAxis(AxisType.Y);
	yAxis.setLabel("Tweets");
	yAxis.setMin(0);
}
 
开发者ID:danielgimenes,项目名称:SmashBrosTwitterAnalytics,代码行数:27,代码来源:AnalyticsBean.java

示例6: createRankBarChart

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createRankBarChart() {
	characterRankChartModel = new HorizontalBarChartModel();
	characterRankChartModel.setShowPointLabels(true);
	ChartSeries chartSeries = new ChartSeries();
	chartSeries.setLabel("Tweets");
	characterRankChartModel.setAnimate(true);
	characterRankChartModel.setShadow(false);
	List<CharacterRankPosition> charactersRank = analyticsController.getCharactersRank();
	for (CharacterRankPosition characterRankPosition : charactersRank) {
		chartSeries.set(characterRankPosition.getCharacter().getPrintableName(), characterRankPosition.getRefs());
	}
	characterRankChartModel.addSeries(chartSeries);
	Axis xAxis = characterRankChartModel.getAxis(AxisType.X);
	xAxis.setLabel("Tweets");
	xAxis.setMin(0);
}
 
开发者ID:danielgimenes,项目名称:SmashBrosTwitterAnalytics,代码行数:17,代码来源:AnalyticsBean.java

示例7: createBarChartModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createBarChartModel() {
    barChartModel = new CartesianChartModel();

    ChartSeries boys = new ChartSeries();
    boys.setLabel("Boys");
    boys.set("2004", 50);
    boys.set("2005", 96);
    boys.set("2006", 44);
    boys.set("2007", 55);
    boys.set("2008", 25);

    ChartSeries girls = new ChartSeries();
    girls.setLabel("Girls");
    girls.set("2004", 52);
    girls.set("2005", 60);
    girls.set("2006", 82);
    girls.set("2007", 35);
    girls.set("2008", 120);

    barChartModel.addSeries(boys);
    barChartModel.addSeries(girls);

}
 
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:24,代码来源:SamplesController.java

示例8: createCategoryModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createCategoryModel() {  
    categoryModel = new BarChartModel();
    
    ChartSeries balanceUS = new ChartSeries();
    ChartSeries balanceUK = new ChartSeries();
  
    for(AccountSummary obj:accountsInfo){
    	balanceUS.set(obj.getAccountType(),new Double(obj.getBalanceUS()));
    	balanceUK.set(obj.getAccountType(),new Double(obj.getBalanceUK()));
    }
    
      
    balanceUS.setLabel("US_Balance");  
    balanceUK.setLabel("UK_Balance");  
  
    categoryModel.addSeries(balanceUS);  
    categoryModel.addSeries(balanceUK);  
    
    categoryModel.setTitle("Marketvalue");
    categoryModel.setLegendPosition("w");
    categoryModel.setShowPointLabels(true);
}
 
开发者ID:sudheerj,项目名称:primefaces-blueprints,代码行数:23,代码来源:AccountSummaryController.java

示例9: createCategoryModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createCategoryModel() {
    categoryModel = new CartesianChartModel();

    ChartSeries boys = new ChartSeries();
    boys.setLabel("Boys");

    boys.set("2004", 120);
    boys.set("2005", 100);
    boys.set("2006", 44);
    boys.set("2007", 150);
    boys.set("2008", 25);

    ChartSeries girls = new ChartSeries();
    girls.setLabel("Girls");

    girls.set("2004", 52);
    girls.set("2005", 60);
    girls.set("2006", 110);
    girls.set("2007", 135);
    girls.set("2008", 120);

    categoryModel.addSeries(boys);
    categoryModel.addSeries(girls);
}
 
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:25,代码来源:ChartBean.java

示例10: createCategoryModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private void createCategoryModel() {  
    categoryModel = new CartesianChartModel();  
  
    ChartSeries boys = new ChartSeries();  
    boys.setLabel("Boys");  
  
    boys.set("2004", 120);  
    boys.set("2005", 100);  
    boys.set("2006", 44);  
    boys.set("2007", 150);  
    boys.set("2008", 25);  
  
    ChartSeries girls = new ChartSeries();  
    girls.setLabel("Girls");  
  
    girls.set("2004", 52);  
    girls.set("2005", 60);  
    girls.set("2006", 110);  
    girls.set("2007", 135);  
    girls.set("2008", 120);  
  
    categoryModel.addSeries(boys);  
    categoryModel.addSeries(girls);  
}
 
开发者ID:diokey,项目名称:ums,代码行数:25,代码来源:ChartBean.java

示例11: getChartModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
public CartesianChartModel getChartModel() {
	if (isChartEmpty()) {
		CartesianChartModel emptyChartModel = new CartesianChartModel();
		ChartSeries emptyChartSeries = new ChartSeries();
		emptyChartSeries.setLabel(Messages.getString(MessageCodes.EMPTY_CHART_LABEL));
		emptyChartSeries.set(dateToString(new Date()), 0);
		emptyChartModel.addSeries(emptyChartSeries);
		return emptyChartModel;
	}
	return chartModel;
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:12,代码来源:EnrollmentChartBean.java

示例12: dvObjectViewStatis

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
public void dvObjectViewStatis() {
    viewLogForDvObj = usageLogSearchService.search(queryForDvObj);
    viewStatisForDvObj = new CartesianChartModel();
    ChartSeries viewAmount = new ChartSeries();
    viewAmount.setLabel(ResourceBundle.getBundle("Bundle", FacesContext.getCurrentInstance().getViewRoot().getLocale()).getString("log.view.distribute.label"));
    for (Pair<String, Long> pair : viewLogForDvObj.getDateHistogram()) {
        viewAmount.set(pair.getFirst(), pair.getSecond());
    }
    viewStatisForDvObj.addSeries(viewAmount);
}
 
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:11,代码来源:UsageLogStatisPage.java

示例13: requestJoinGroupStatis

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
public void requestJoinGroupStatis(){
    if(!dvObject.isInstanceofDataverse())return ;
    
    if(selectedGroupId == 0){
        queryForGroup.setGroupIds(allGroupIds);
    }else{
        queryForGroup.setGroupIds(Arrays.asList(selectedGroupId));
    }
    
    if(selectedEventType == 0){
        queryForGroup.setEvents(Arrays.asList(EventType.REQUEST_JOIN_GROUP,
                EventType.REJECT_JOIN_GROUP,
                EventType.ACCEPT_JOIN_GROUP));
    }else if(selectedEventType == 1){
        queryForGroup.setEvents(Arrays.asList(EventType.REQUEST_JOIN_GROUP));
    }else if(selectedEventType == 2){
        queryForGroup.setEvents(Arrays.asList(EventType.REJECT_JOIN_GROUP));
    }else if(selectedEventType == 3){
        queryForGroup.setEvents(Arrays.asList(EventType.ACCEPT_JOIN_GROUP));
    }
    
    logForGroup = usageLogSearchService.search(queryForGroup);
    statisForGroup = new CartesianChartModel();
    ChartSeries requestAmount = new ChartSeries();
    requestAmount.setLabel(ResourceBundle.getBundle("Bundle", FacesContext.getCurrentInstance().getViewRoot().getLocale()).getString("log.requestjoingroup.distribute.label"));
    for(Pair<String,Long> pair : logForGroup.getDateHistogram()){
        requestAmount.set(pair.getFirst(), pair.getSecond());
    }
    statisForGroup.addSeries(requestAmount);
}
 
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:31,代码来源:UsageLogStatisPage.java

示例14: initBarModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private BarChartModel initBarModel() {
    BarChartModel model = new BarChartModel();
    model.setTitle("Desempenho geral");
    model.setAnimate(true);
    model.setLegendPosition("ne");
    Axis yAxis = model.getAxis(AxisType.Y);
    yAxis.setMin(0);
    yAxis.setMax(20);
    
    ChartSeries acertos = new ChartSeries();
    acertos.setLabel("Acertos");
    
    ChartSeries erros = new ChartSeries();
    erros.setLabel("Erros");
    
    for (int i = 0; i < listMaterias.size(); i++) {
   
    	Long acertosMateria = pessoaAcertosRepository.getAcertosMateriaGeral(listMaterias.get(i).getId());
    	acertos.set(listMaterias.get(i).getDescricao(), acertosMateria);
    	
    	Long errosMateria = pessoaAcertosRepository.getErrosMateriaGeral(listMaterias.get(i).getId());
    	erros.set(listMaterias.get(i).getDescricao(), errosMateria);
    }
		
    
    model.addSeries(acertos);
    model.addSeries(erros);
     
    return model;
}
 
开发者ID:Corlobin,项目名称:Pecomp,代码行数:31,代码来源:DesempenhoEstudanteBean.java

示例15: initBarModel

import org.primefaces.model.chart.ChartSeries; //导入方法依赖的package包/类
private BarChartModel initBarModel() {
    BarChartModel model = new BarChartModel();
    model.setTitle("Todas as Instituições");
    model.setAnimate(true);
    model.setLegendPosition("ne");
    Axis yAxis = model.getAxis(AxisType.Y);
    yAxis.setMin(0);
    yAxis.setMax(20);
    
    ChartSeries acertos = new ChartSeries();
    acertos.setLabel("Acertos");
    
    ChartSeries erros = new ChartSeries();
    erros.setLabel("Erros");
    
    for (int i = 0; i < listInstituicao.size(); i++) {
   
    	Long acertosInstituicao = pessoaAcertosRepository.getAcertosInstituicaoGeral(listInstituicao.get(i).getId());
    	acertos.set(listInstituicao.get(i).getNome(), acertosInstituicao);
    	
    	Long errosInstituicao = pessoaAcertosRepository.getErrosInstituicaoGeral(listInstituicao.get(i).getId());
    	erros.set(listInstituicao.get(i).getNome(), errosInstituicao);
    }
		
    
    model.addSeries(acertos);
    model.addSeries(erros);
     
    return model;
}
 
开发者ID:Corlobin,项目名称:Pecomp,代码行数:31,代码来源:DesempenhoInstituicaoBean.java


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