本文整理汇总了Java中org.primefaces.model.chart.CartesianChartModel类的典型用法代码示例。如果您正苦于以下问题:Java CartesianChartModel类的具体用法?Java CartesianChartModel怎么用?Java CartesianChartModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CartesianChartModel类属于org.primefaces.model.chart包,在下文中一共展示了CartesianChartModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: fileDownloadStatis
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的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: createLinearModel
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
private void createLinearModel() {
linearModel = new CartesianChartModel();
LineChartSeries series1 = new LineChartSeries();
series1.setLabel("Series 1");
series1.set(1, 2);
series1.set(2, 1);
series1.set(3, 3);
series1.set(4, 6);
series1.set(5, 8);
LineChartSeries series2 = new LineChartSeries();
series2.setLabel("Series 2");
series2.setMarkerStyle("diamond");
series2.set(1, 6);
series2.set(2, 3);
series2.set(3, 2);
series2.set(4, 7);
series2.set(5, 9);
linearModel.addSeries(series1);
linearModel.addSeries(series2);
}
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:26,代码来源:ChartBean.java
示例3: createBarChartModel
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的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
示例4: createComponent
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
@Override
public Object createComponent(String widgetId) {
this.widgetId = widgetId;
model = new CartesianChartModel();
ChartSeries series1 = new ChartSeries(widget.getProperties().get(0).getKey());
// TODO buscar os valores atualizados da propriedade do device
Integer randomNum = new Random().nextInt((100 - 0) + 1) + 1;
series1.set(++count, randomNum);
model.addSeries(series1);
chart = new LineChart();
chart.setValue(model);
return chart;
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:18,代码来源:UILineComponent.java
示例5: createComponent
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
@Override
public Object createComponent(String widgetId) {
this.widgetId = widgetId;
model = new CartesianChartModel();
for (Property prop : widget.getProperties()) {
ChartSeries series = new ChartSeries(prop.getDevice().getKey());
// TODO buscar os valores atualizados da propriedade do device
Integer randomNum = new Random().nextInt((100 - 0) + 1) + 1;
series.set(prop.getKey(), randomNum);
model.addSeries(series);
}
chart = new BarChart();
//chart.setOrientation("horizontal");
//chart.setLegendPosition("ne");
//chart.setYaxisAngle(90);
chart.setValue(model);
//chart.setStyle("height: 100px; width: 100px;");
return chart;
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:27,代码来源:UIBarComponent.java
示例6: createComponent
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
@Override
public Object createComponent(String widgetId) {
this.widgetId = widgetId;
model = new CartesianChartModel();
for (Property prop : widget.getProperties()) {
ChartSeries series = new ChartSeries(prop.getDevice().getKey());
Double value = 0d;
if (prop.getValue() != null && !"".equals(prop.getValue())) {
value = new Double(prop.getValue());
}
series.set(prop.getKey(), value);
model.addSeries(series);
}
chart = new LineChart();
chart.setFill(true);
chart.setStacked(true);
chart.setValue(model);
return chart;
}
开发者ID:rcandidosilva,项目名称:paas-iot-platform,代码行数:24,代码来源:UIAreaComponent.java
示例7: createCategoryModel
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的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
示例8: createCombinedModel
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
private void createCombinedModel() {
combinedModel = new CartesianChartModel();
BarChartSeries boys = new BarChartSeries();
boys.setLabel("Boys");
boys.set("2004", 120);
boys.set("2005", 100);
boys.set("2006", 44);
boys.set("2007", 150);
boys.set("2008", 25);
LineChartSeries girls = new LineChartSeries();
girls.setLabel("Girls");
girls.set("2004", 52);
girls.set("2005", 60);
girls.set("2006", 110);
girls.set("2007", 135);
girls.set("2008", 120);
combinedModel.addSeries(boys);
combinedModel.addSeries(girls);
}
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:25,代码来源:ChartBean.java
示例9: createCombinedModel2
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
private void createCombinedModel2() {
combinedModel2 = new CartesianChartModel();
BarChartSeries boys = new BarChartSeries();
boys.setLabel("Boys");
boys.set("2004", 120);
boys.set("2005", 100);
boys.set("2006", 44);
boys.set("2007", 150);
boys.set("2008", 25);
LineChartSeries girls = new LineChartSeries();
girls.setLabel("Girls");
girls.set("2004", 52);
girls.set("2005", 60);
girls.set("2006", 110);
girls.set("2007", 135);
girls.set("2008", 120);
girls.setFill(true);
combinedModel2.addSeries(girls);
combinedModel2.addSeries(boys);
}
开发者ID:websphere,项目名称:PrimefacesShowcase,代码行数:26,代码来源:ChartBean.java
示例10: createChart
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
/**
* grafik oluşturur
*
* @param datas
*/
private void createChart(final List<HealthData> datas) {
final CartesianChartModel model = new CartesianChartModel();
for (final String fieldName : selectedFields) {
final HealthDataField field =
healthDataFieldFacade.getField(fieldName);
final LineChartSeries series = new LineChartSeries();
series.setLabel(field.getTitle());
for (final HealthData data : datas) {
if (data.exist(field)) {
final HealthDataValue value = data.getValue(field);
final Long id = data.getId();
series.set(id, value.getValue());
}
}
model.addSeries(series);
}
lineChartModel = model;
configureChart();
}
开发者ID:omerozkan,项目名称:vipera,代码行数:25,代码来源:HealthDataChartBean.java
示例11: createCategoryModel
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的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
示例12: dvObjectViewStatis
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的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.CartesianChartModel; //导入依赖的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: init
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
@PostConstruct
public void init() {
if ( riepiloghi == null ) {
chartNumero = new CartesianChartModel();
chartImporto = new CartesianChartModel();
chartQuantita = new CartesianChartModel();
chartAnomalie = new CartesianChartModel();
riepiloghi = dashboardService.findRiepilogoRifornimento( start.clone(), len );
anomalie = dashboardService.findTotaleRiepilogoAnomalia( start.clone(), len );
ChartSeries csNum = new ChartSeries();
ChartSeries csImp = new ChartSeries();
ChartSeries csQua = new ChartSeries();
ChartSeries csAno = new ChartSeries();
csNum.setLabel( "Rifornimenti" );
csImp.setLabel( "Spesa" );
csQua.setLabel( "Litri" );
csAno.setLabel( "Anomalie" );
for ( RiepilogoRifornimento riepilogo : riepiloghi ) {
csNum.set( riepilogo.getLabel(), riepilogo.getNumero() );
csImp.set( riepilogo.getLabel(), riepilogo.getImporto() );
csQua.set( riepilogo.getLabel(), riepilogo.getQuantita() );
}
for ( RiepilogoAnomalia anomalia : anomalie ) {
csAno.set( anomalia.getLabel(), anomalia.getNumero() );
}
chartNumero.addSeries( csNum );
chartImporto.addSeries( csImp );
chartQuantita.addSeries( csQua );
chartAnomalie.addSeries( csAno );
}
}
开发者ID:Inspiredsoft,项目名称:parco,代码行数:40,代码来源:Dashboard.java
示例15: resetCharts
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
public void resetCharts() {
this.cartesianChartModelList = new ArrayList<CartesianChartModel>();
this.cartesianCharModelBackupList = new ArrayList<CartesianChartModel>();
this.filled = new ArrayList<Boolean>();
this.stacked = new ArrayList<Boolean>();
this.rescaled = new ArrayList<Boolean>();
this.stacked.add(false);
this.filled.add(false);
this.rescaled.add(false);
}
开发者ID:disit,项目名称:iclos,代码行数:11,代码来源:AnalyzeMetricsController.java
示例16: createModelFromList
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
private CartesianChartModel createModelFromList(
final List<List<ServiceMetric>> serviceMetricListList) {
CartesianChartModel cartesianChart = new CartesianChartModel();
for (List<ServiceMetric> serviceMetricList : serviceMetricListList) {
if (!serviceMetricList.isEmpty()) {
ChartSeries chartSeries = new ChartSeries();
for (ServiceMetric serviceMetric : serviceMetricList) {
if (serviceMetric.getDependsOn().contains("Host")) {
HostMachineDAO hostMachineDAO = new HostMachineDAO();
chartSeries.setLabel(hostMachineDAO
.getHostMachineByURI(this.ipOfKB,
serviceMetric.getDependsOn())
.getHasName());
}
if (serviceMetric.getDependsOn().contains("Virtual")) {
VirtualMachineDAO virtualMachineDAO = new VirtualMachineDAO();
chartSeries.setLabel(virtualMachineDAO
.getVirtualMachineByURI(this.ipOfKB,
serviceMetric.getDependsOn())
.getHasName());
}
chartSeries.set(serviceMetric.getAtTime(),
serviceMetric.getHasMetricValue());
}
cartesianChart.addSeries(chartSeries);
}
}
return cartesianChart;
}
开发者ID:disit,项目名称:iclos,代码行数:33,代码来源:AnalyzeMetricsController.java
示例17: DataCenterSimulatorMonitor
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
public DataCenterSimulatorMonitor(
final List<HostMachineSimulator> hostMachineSimulatorList) {
this.monitorTime = 5;
this.cartesianChartModelCPUList = new ArrayList<CartesianChartModel>();
this.cartesianChartModelMemoryList = new ArrayList<CartesianChartModel>();
this.cartesianChartModelStorageList = new ArrayList<CartesianChartModel>();
this.cartesianChartModelCPUListList = new ArrayList<List<CartesianChartModel>>();
this.cartesianChartModelMemoryListList = new ArrayList<List<CartesianChartModel>>();
this.cartesianChartModelStorageListList = new ArrayList<List<CartesianChartModel>>();
this.hostMachineSimulatorList = hostMachineSimulatorList;
}
开发者ID:disit,项目名称:iclos,代码行数:15,代码来源:DataCenterSimulatorMonitor.java
示例18: getViewStatisForDvObj
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
public CartesianChartModel getViewStatisForDvObj() {
return viewStatisForDvObj;
}
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:4,代码来源:UsageLogStatisPage.java
示例19: setViewStatisForDvObj
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
public void setViewStatisForDvObj(CartesianChartModel viewStatisForDvObj) {
this.viewStatisForDvObj = viewStatisForDvObj;
}
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:4,代码来源:UsageLogStatisPage.java
示例20: getStatisForFile
import org.primefaces.model.chart.CartesianChartModel; //导入依赖的package包/类
public CartesianChartModel getStatisForFile() {
return statisForFile;
}
开发者ID:pengchengluo,项目名称:Peking-University-Open-Research-Data-Platform,代码行数:4,代码来源:UsageLogStatisPage.java
注:本文中的org.primefaces.model.chart.CartesianChartModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论