本文整理了Java中org.jfree.chart.JFreeChart.setPadding()
方法的一些代码示例,展示了JFreeChart.setPadding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFreeChart.setPadding()
方法的具体详情如下:
包路径:org.jfree.chart.JFreeChart
类名称:JFreeChart
方法名:setPadding
[英]Sets the padding between the chart border and the chart drawing area, and sends a ChartChangeEvent to all registered listeners.
[中]设置图表边框和图表绘图区域之间的填充,并向所有注册的侦听器发送ChartChangeEvent。
代码示例来源:origin: stackoverflow.com
JFreeChart chart;
// initialize the chart
chart.setPadding(new RectangleInsets(50, 0, 0, 0));
代码示例来源:origin: lessthanoptimal/Java-Matrix-Benchmark
public OperationsVersusSizePlot( String title, String ylabel)
{
chart = ChartFactory.createXYLineChart(title,
"Matrix Size",
ylabel,
null,
PlotOrientation.VERTICAL,
true , false , false );
// chart.removeLegend();
plot = (XYPlot) chart.getPlot();
plot.setBackgroundPaint(Color.WHITE);
// final NumberAxis rangeAxis = new LogarithmicAxis(ylabel);
// plot.setRangeAxis(rangeAxis);
// one of the numbers is getting cropped. this will make it fully visible
chart.setPadding(new RectangleInsets(5,0,0,5));
}
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding(new RectangleInsets(10,5,5,5));
chart.setBorderVisible(true);
chart.setBorderPaint(parseColor("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
private byte[] generateBoxAndWhiskerChart (BoxAndWhiskerCategoryDataset dataset, int width, int height)
{
JFreeChart chart = ChartFactory.createBoxAndWhiskerChart (null, null,
null, dataset, false);
// set background
chart.setBackgroundPaint (parseColor (statsManager.getChartBackgroundColor ()));
// set chart border
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
// set anti alias
chart.setAntiAlias (true);
CategoryPlot plot = (CategoryPlot) chart.getPlot ();
plot.setDomainGridlinePaint (Color.white);
plot.setDomainGridlinesVisible (true);
plot.setRangeGridlinePaint (Color.white);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis ();
rangeAxis.setStandardTickUnits (NumberAxis.createIntegerTickUnits ());
CategoryAxis domainAxis = (CategoryAxis) plot.getDomainAxis ();
domainAxis.setLowerMargin (0.0);
domainAxis.setUpperMargin (0.0);
BufferedImage img = chart.createBufferedImage (width, height);
final ByteArrayOutputStream out = new ByteArrayOutputStream();
try{
ImageIO.write(img, "png", out);
}catch(IOException e){
log.warn("Error occurred while generating SiteStats chart image data", e);
}
return out.toByteArray();
}
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding(new RectangleInsets(5,5,5,5));
plot.setInsets(new RectangleInsets(1,1,1,1));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding(new RectangleInsets(10,5,5,5));
chart.setBorderVisible(true);
chart.setBorderPaint(parseColor("#cccccc"));
代码示例来源:origin: jfree/eastwood
/**
* Creates a sparkline chart.
*
* @return A sparkline chart.
*/
private static JFreeChart createSparklineChart() {
GXYPlot plot = new GXYPlot();
plot.setInsets(RectangleInsets.ZERO_INSETS);
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
renderer.setBaseShapesVisible(false);
plot.setRenderer(renderer);
JFreeChart chart = new JFreeChart(plot);
chart.setPadding(RectangleInsets.ZERO_INSETS);
chart.removeLegend();
chart.setBackgroundPaint(Color.white);
renderer.setBasePaint(new Color(0xFF9900));
renderer.setBaseStroke(new BasicStroke(1.5f, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND));
renderer.setAutoPopulateSeriesPaint(false);
GValueAxis xAxis = new GValueAxis();
xAxis.setVisible(false);
plot.setDomainAxis(xAxis);
GValueAxis yAxis = new GValueAxis();
yAxis.setVisible(false);
plot.setRangeAxis(yAxis);
plot.setDomainGridlinesVisible(false);
plot.setRangeGridlinesVisible(false);
return chart;
}
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding(new RectangleInsets(10,5,5,5));
chart.setBorderVisible(true);
chart.setBorderPaint(parseColor("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
代码示例来源:origin: org.sakaiproject.sitestats/sitestats-impl
chart.setPadding (new RectangleInsets (10, 5, 5, 5));
chart.setBorderVisible (true);
chart.setBorderPaint (parseColor ("#cccccc"));
内容来源于网络,如有侵权,请联系作者删除!