本文整理汇总了Java中org.jfree.chart.renderer.xy.XYLineAndShapeRenderer.setDefaultEntityRadius方法的典型用法代码示例。如果您正苦于以下问题:Java XYLineAndShapeRenderer.setDefaultEntityRadius方法的具体用法?Java XYLineAndShapeRenderer.setDefaultEntityRadius怎么用?Java XYLineAndShapeRenderer.setDefaultEntityRadius使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
的用法示例。
在下文中一共展示了XYLineAndShapeRenderer.setDefaultEntityRadius方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
/**
* Creates a sample chart.
*
* @param dataset a dataset for the chart.
* @return A sample chart.
*/
private static JFreeChart createChart( XYDataset dataset ) {
JFreeChart chart = ChartFactory.createXYLineChart(
"XYLineAndShapeRenderer Demo 1",
"X",
"Y",
dataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
XYPlot plot = (XYPlot)chart.getPlot();
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
renderer.setSeriesLinesVisible( 0, true );
renderer.setSeriesShapesVisible( 0, false );
renderer.setSeriesLinesVisible( 1, true );
renderer.setSeriesShapesVisible( 1, false );
renderer.setToolTipGenerator( new StandardXYToolTipGenerator() );
renderer.setDefaultEntityRadius( 6 );
plot.setRenderer( renderer );
return chart;
}
示例2: StripChart
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
/**
* @param title
* @param seriesNames
* @param xAxisLabel
* @param yAxisLabel
* @param orienation
* @param xAxisRange
* @param minY
* @param maxY
* @param buffSize
*/
public StripChart( String title,
String[] seriesNames,
String xAxisLabel,
String yAxisLabel,
PlotOrientation orienation,
double xAxisRange,
double minY,
double maxY,
int buffSize ) {
this.xAxisRange = xAxisRange;
this.buffSize = buffSize;
buffTail = buffSize - 1;
series = new XYSeries[seriesNames.length];
buffer = new double[seriesNames.length + 1][buffSize];
clockBufferIdx = seriesNames.length;
XYSeriesCollection dataset = new XYSeriesCollection();
for( int i = 0; i < series.length; i++ ) {
series[i] = new XYSeries( seriesNames[i] );
dataset.addSeries( series[i] );
}
chart = ChartFactory.createXYLineChart(
title,
xAxisLabel,
yAxisLabel,
dataset,
orienation,
true,
true,
false
);
chart.getXYPlot().setDomainGridlinesVisible( false );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getLegend().setHorizontalAlignment( HorizontalAlignment.RIGHT );
plot = (XYPlot)chart.getPlot();
plot.getRangeAxis().setRange( minY, maxY );
renderer = new XYLineAndShapeRenderer();
for( int i = 0; i < series.length; i++ ) {
renderer.setSeriesLinesVisible( i, true );
renderer.setSeriesShapesVisible( i, false );
}
renderer.setSeriesLinesVisible( series.length, false );
renderer.setSeriesShapesVisible( series.length, false );
renderer.setToolTipGenerator( new StandardXYToolTipGenerator() );
renderer.setDefaultEntityRadius( 6 );
plot.setRenderer( renderer );
// Set the minimum X value. This also sets the x range
setMinX( 0 );
}