本文整理匯總了Java中org.jfree.chart.renderer.category.CategoryItemRenderer.setItemLabelsVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java CategoryItemRenderer.setItemLabelsVisible方法的具體用法?Java CategoryItemRenderer.setItemLabelsVisible怎麽用?Java CategoryItemRenderer.setItemLabelsVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.renderer.category.CategoryItemRenderer
的用法示例。
在下文中一共展示了CategoryItemRenderer.setItemLabelsVisible方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: visualizarSerieChartAsignRescateVict
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
public void visualizarSerieChartAsignRescateVict(Color color,CategoryDataset dataset) {
ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
chartNotifAsigResc.setBackgroundPaint(Color.white);
CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
plot.setBackgroundPaint(color);
plot.setDataset(dataset);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
this.setVisible(true);
}
示例2: visualizarSeriesTiemposRescateVictPorRobots
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
public void visualizarSeriesTiemposRescateVictPorRobots(CategoryDataset dataset) {
JFreeChart chart = ChartFactory.createBarChart(
"Tiempos de Rescate de Victimas por cada robot ", // chart title
"Robots en el entorno", // domain axis label
"Tiempo milisegundos", // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true, // tooltips?
false // URLs?
);
ChartPanel chartPanel = new ChartPanel(chart);
chart.setBackgroundPaint(Color.white);
CategoryPlot plot = chart.getCategoryPlot();
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
this.visualizar(chartPanel);
}
示例3: visualizarSeriesEnergRescateVictPorRobots
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
public void visualizarSeriesEnergRescateVictPorRobots(CategoryDataset dataset) {
JFreeChart chart = ChartFactory.createBarChart(
"Tiempos de Rescate de Victimas por cada robot ", // chart title
"Robots en el entorno", // domain axis label
"Unidades de energ�a", // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true, // tooltips?
false // URLs?
);
ChartPanel chartPanel = new ChartPanel(chart);
chart.setBackgroundPaint(Color.white);
CategoryPlot plot = chart.getCategoryPlot();
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
this.visualizar(chartPanel);
}
示例4: crearBarChartCosteEnergiaRescateVictimas
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
public void crearBarChartCosteEnergiaRescateVictimas(CategoryDataset dataset) {
JFreeChart chart = ChartFactory.createBarChart(
"Energ�a consumida para salvar las victimas ", // chart title
"Victimas ordenadas por tiempo de rescate", // domain axis label
"Energ�a consumida", // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
true, // tooltips?
false // URLs?
);
ChartPanel chartPanel = new ChartPanel(chart);
chart.setBackgroundPaint(Color.white);
CategoryPlot plot = chart.getCategoryPlot();
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
this.setVisible(true);
// return chart;
}
示例5: crearChartAsignRescateVict
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
public JFreeChart crearChartAsignRescateVict(CategoryDataset dataset) {
chartNotifAsigResc = ChartFactory.createLineChart(
"Tiempos de Rescate de Victimas ", // chart title Titulo local del grafico
"Victimas Rescatadas en Entorno", // x axis label
"Tiempo milisegundos", // y axis label
dataset, // data
PlotOrientation.VERTICAL,
true, // include legend
true, // tooltips
false // urls
);
// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc,false);
chartNotifAsigResc.setBackgroundPaint(Color.white);
// CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
CategoryPlot plot = chartNotifAsigResc.getCategoryPlot();
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
this.setVisible(true);
return chartNotifAsigResc;
}
示例6: crearLineChartAsignRescateVict
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
public JFreeChart crearLineChartAsignRescateVict(CategoryDataset dataset) {
chartNotifAsigResc = ChartFactory.createLineChart(
"Tiempos de Notificaci�n, asiganci�n y Rescate de Victimas ", // chart title Titulo local del grafico
"Victimas Ordenadas por tiempo de rescate ", // x axis label
"Tiempo milisegundos", // y axis label
dataset, // data
PlotOrientation.VERTICAL,
true, // include legend
true, // tooltips
false // urls
);
// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
// chartNotifAsigResc.setBackgroundPaint(Color.white);
CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
// CategoryPlot plot = chartNotifAsigResc.getCategoryPlot();
// plot.setBackgroundPaint(Color.lightGray);
// plot.setDomainGridlinePaint(Color.white);
// plot.setRangeGridlinePaint(Color.white);
// NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
// rangeAxis.setUpperMargin(0.15);
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setItemLabelGenerator(new LabelGenerator(50.0));
renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
renderer.setItemLabelsVisible(true);
// CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
LineAndShapeRenderer rendererl = (LineAndShapeRenderer) plot.getRenderer();
rendererl.setShapesVisible(true);
rendererl.setDrawOutlines(true);
rendererl.setUseFillPaint(true);
rendererl.setFillPaint(Color.white);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
this.pack();
RefineryUtilities.centerFrameOnScreen(this);
this.setVisible(true);
return chartNotifAsigResc;
}