本文整理汇总了Java中org.primefaces.model.chart.Axis.setMax方法的典型用法代码示例。如果您正苦于以下问题:Java Axis.setMax方法的具体用法?Java Axis.setMax怎么用?Java Axis.setMax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.primefaces.model.chart.Axis
的用法示例。
在下文中一共展示了Axis.setMax方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initBarModelIndividual
import org.primefaces.model.chart.Axis; //导入方法依赖的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;
}
示例2: constructChartModel
import org.primefaces.model.chart.Axis; //导入方法依赖的package包/类
private LineChartModel constructChartModel(DatePeriod datePeriod, LineChartSeries lineChartSeries1, LineChartSeries lineChartSeries2, int max) {
LineChartModel lineChartModel = new LineChartModel();
lineChartModel.setExtender("ext"); // must exist javascript function
// ext(), which sets conf. data
DateAxis xAxis = new DateAxis();
xAxis.setMin(datePeriod.getDateFrom().getTime() - 10000);
xAxis.setMax(datePeriod.getDateTo().getTime() + 10000);
lineChartModel.getAxes().put(AxisType.X, xAxis);
Axis yAxis = lineChartModel.getAxis(AxisType.Y);
yAxis.setMin(0);
yAxis.setMax(max + max / 10);
lineChartModel.addSeries(lineChartSeries1);
lineChartModel.addSeries(lineChartSeries2);
return lineChartModel;
}
示例3: initLinearModel
import org.primefaces.model.chart.Axis; //导入方法依赖的package包/类
private void initLinearModel() {
/* 48 */ this.lineModel = new LineChartModel();
/* 49 */ this.lineModel.setTitle("Linear Chart");
/* 50 */ this.lineModel.setLegendPosition("e");
/* 51 */ this.lineModel.setExtender("skinChart");
/* 52 */ this.lineModel.setAnimate(true);
/* 53 */ Axis yAxis = this.lineModel.getAxis(AxisType.Y);
/* 54 */ yAxis.setMin(Integer.valueOf(0));
/* 55 */ yAxis.setMax(Integer.valueOf(10));
/* */
/* 57 */ LineChartSeries series1 = new LineChartSeries();
/* 58 */ series1.setLabel("Series 1");
/* */
/* 60 */ series1.set(Integer.valueOf(1), Integer.valueOf(2));
/* 61 */ series1.set(Integer.valueOf(2), Integer.valueOf(1));
/* 62 */ series1.set(Integer.valueOf(3), Integer.valueOf(3));
/* 63 */ series1.set(Integer.valueOf(4), Integer.valueOf(6));
/* 64 */ series1.set(Integer.valueOf(5), Integer.valueOf(8));
/* */
/* 66 */ LineChartSeries series2 = new LineChartSeries();
/* 67 */ series2.setLabel("Series 2");
/* */
/* 69 */ series2.set(Integer.valueOf(1), Integer.valueOf(6));
/* 70 */ series2.set(Integer.valueOf(2), Integer.valueOf(3));
/* 71 */ series2.set(Integer.valueOf(3), Integer.valueOf(2));
/* 72 */ series2.set(Integer.valueOf(4), Integer.valueOf(7));
/* 73 */ series2.set(Integer.valueOf(5), Integer.valueOf(9));
/* */
/* 75 */ this.lineModel.addSeries(series1);
/* 76 */ this.lineModel.addSeries(series2);
/* */ }
示例4: initBarModel
import org.primefaces.model.chart.Axis; //导入方法依赖的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;
}
示例5: initLinearModel
import org.primefaces.model.chart.Axis; //导入方法依赖的package包/类
private LineChartModel initLinearModel() {
LineChartModel model = new LineChartModel();
model.setStacked(true);
model.setShowPointLabels(true);
model.setTitle("Matematica");
model.setLegendPosition("ne");
Axis xAxis = new CategoryAxis("Anos");
model.getAxes().put(AxisType.X, xAxis);
xAxis.setLabel("Quantidade");
Axis yAxis = model.getAxis(AxisType.Y);
yAxis.setMin(0);
yAxis.setMax(20);
LineChartSeries series1 = new LineChartSeries();
series1.setLabel("Acertos");
series1.set("2014", 50);
series1.set("2013", 40);
series1.set("2012", 30);
series1.set("2011", 20);
series1.set("2010", 10);
LineChartSeries series2 = new LineChartSeries();
series2.setLabel("Erros");
series2.set("2014", 20);
series2.set("2013", 19);
series2.set("2012", 16);
series2.set("2011", 14);
series2.set("2010", 12);
model.addSeries(series1);
model.addSeries(series2);
return model;
}
示例6: initBarModel
import org.primefaces.model.chart.Axis; //导入方法依赖的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;
}
示例7: createLineModels
import org.primefaces.model.chart.Axis; //导入方法依赖的package包/类
private void createLineModels() {
lineModel = initCategoryModel();
lineModel.setTitle("Category Chart");
lineModel.setLegendPosition("e");
lineModel.setShowPointLabels(true);
lineModel.getAxes().put(AxisType.X, new CategoryAxis("Months"));
Axis yAxis = lineModel.getAxis(AxisType.Y);
yAxis.setLabel("TODO");
yAxis.setMin(0);
yAxis.setMax(200);
}
示例8: createLineModels
import org.primefaces.model.chart.Axis; //导入方法依赖的package包/类
private void createLineModels() {
lineModel = initLinearModel();
lineModel.setTitle("Oil Production (MBPD vs time in years)");
lineModel.setLegendPosition("e");
Axis xAxis = lineModel.getAxis(AxisType.X);
xAxis.setMin(1900);
xAxis.setMax(2050);
xAxis.setTickInterval("10");
Axis yAxis = lineModel.getAxis(AxisType.Y);
yAxis.setMin(0);
}
示例9: initLinearPorInsituicao
import org.primefaces.model.chart.Axis; //导入方法依赖的package包/类
private LineChartModel initLinearPorInsituicao() {
this.instituicao = instituicoesRepository.getById(idInstituicaoSelecionada);
LineChartModel model = new LineChartModel();
model.setStacked(true);
model.setShowPointLabels(true);
model.setTitle(instituicao.getNome());
model.setLegendPosition("ne");
Axis xAxis = new CategoryAxis("Disciplinas");
model.getAxes().put(AxisType.X, xAxis);
xAxis.setLabel("Disciplinas");
Axis yAxis = model.getAxis(AxisType.Y);
yAxis.setMin(0);
yAxis.setMax(20);
LineChartSeries acertos = new LineChartSeries();
acertos.setLabel("Acertos");
LineChartSeries erros = new LineChartSeries();
erros.setLabel("Erros");
for (int i = 0; i < listMaterias.size(); i++) {
Long count = pessoaAcertosRepository.getAcertosInstituicaoPorMateria(idInstituicaoSelecionada, listMaterias.get(i).getId());
acertos.set(listMaterias.get(i).getDescricao(), count);
Long count2 = pessoaAcertosRepository.getErrosInstituicaoPorMateria(idInstituicaoSelecionada, listMaterias.get(i).getId());
erros.set(listMaterias.get(i).getDescricao(), count2);
//Apenas para verificar erro no resultado (apagar!!)
String a = listMaterias.get(i).getDescricao();
System.out.println("Acertos mat e count: " + a + count);
System.out.println("Erros mat e count: " + a + count2);
}
model.addSeries(acertos);
model.addSeries(erros);
idInstituicaoSelecionada = null;
return model;
}