当前位置: 首页>>代码示例>>Java>>正文


Java LineAndShapeRenderer.setSeriesOutlinePaint方法代码示例

本文整理汇总了Java中org.jfree.chart.renderer.category.LineAndShapeRenderer.setSeriesOutlinePaint方法的典型用法代码示例。如果您正苦于以下问题:Java LineAndShapeRenderer.setSeriesOutlinePaint方法的具体用法?Java LineAndShapeRenderer.setSeriesOutlinePaint怎么用?Java LineAndShapeRenderer.setSeriesOutlinePaint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.renderer.category.LineAndShapeRenderer的用法示例。


在下文中一共展示了LineAndShapeRenderer.setSeriesOutlinePaint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createLineChart

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
@Override
	protected JFreeChart createLineChart() throws JRException
	{
		JFreeChart jfreeChart = super.createLineChart();
		CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
		LineAndShapeRenderer lineRenderer = (LineAndShapeRenderer)categoryPlot.getRenderer();
		lineRenderer.setBaseStroke(new BasicStroke(2f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
//		Stroke stroke = new BasicStroke(2f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);

		for (int i = 0; i < lineRenderer.getRowCount(); i++)
		{
			lineRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
			lineRenderer.setSeriesFillPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
			lineRenderer.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
			lineRenderer.setSeriesShapesVisible(i,true);
			//it isn't applied at the moment
			//lineRenderer.setSeriesStroke(i,stroke);
			
			//line3DRenderer.setSeriesLinesVisible(i,lineRenderer.getSeriesVisible(i));
		}
//		configureChart(jfreeChart, getPlot());
		return jfreeChart;
	}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:EyeCandySixtiesChartTheme.java

示例2: configureLineAndShapeRenderer

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
private static void configureLineAndShapeRenderer(LineAndShapeRenderer renderer, ValueSource valueSource, PlotInstance plotInstance) {
	ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource);
	int seriesCount = valueSourceData.getSeriesCount();
	SeriesFormat seriesFormat = valueSource.getSeriesFormat();
	DimensionConfig domainConfig = valueSource.getDomainConfig();
	DimensionConfig colorDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(PlotDimension.COLOR);
	DimensionConfig shapeDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(PlotDimension.SHAPE);

	renderer.setDefaultEntityRadius(4);

	// loop all series and set series format
	for(int seriesIdx = 0; seriesIdx < seriesCount; ++seriesIdx) {
		// configure linestyle
		if(seriesFormat.getLineStyle() != LineStyle.NONE) {
			renderer.setSeriesLinesVisible(seriesIdx, true);
			renderer.setSeriesStroke(seriesIdx, seriesFormat.getStroke(),false);
		} else {
			renderer.setSeriesLinesVisible(seriesIdx, false);
		}

		// configure series shape if necessary
		if(!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, shapeDimensionConfig) ){
			if(seriesFormat.getItemShape() != ItemShape.NONE) {
				renderer.setSeriesShapesVisible(seriesIdx, true);
				renderer.setSeriesShape(seriesIdx, seriesFormat.getItemShape().getShape());
			} else {
				renderer.setSeriesShapesVisible(seriesIdx, false);	
			}
		}

		// configure series color if necessary
		if(!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, colorDimensionConfig) ){
			Color itemColor = seriesFormat.getItemColor();
			renderer.setSeriesPaint(seriesIdx, itemColor);
		} 
		renderer.setSeriesOutlinePaint(seriesIdx, PlotConfiguration.DEFAULT_SERIES_OUTLINE_PAINT);
		renderer.setUseOutlinePaint(true);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:40,代码来源:ChartRendererFactory.java

示例3: configureLineAndShapeRenderer

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
private static void configureLineAndShapeRenderer(LineAndShapeRenderer renderer, ValueSource valueSource,
		PlotInstance plotInstance) {
	ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource);
	int seriesCount = valueSourceData.getSeriesCount();
	SeriesFormat seriesFormat = valueSource.getSeriesFormat();
	DimensionConfig domainConfig = valueSource.getDomainConfig();
	DimensionConfig colorDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
			PlotDimension.COLOR);
	DimensionConfig shapeDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
			PlotDimension.SHAPE);

	renderer.setDefaultEntityRadius(4);

	// loop all series and set series format
	for (int seriesIdx = 0; seriesIdx < seriesCount; ++seriesIdx) {
		// configure linestyle
		if (seriesFormat.getLineStyle() != LineStyle.NONE) {
			renderer.setSeriesLinesVisible(seriesIdx, true);
			renderer.setSeriesStroke(seriesIdx, seriesFormat.getStroke(), false);
		} else {
			renderer.setSeriesLinesVisible(seriesIdx, false);
		}

		// configure series shape if necessary
		if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, shapeDimensionConfig)) {
			if (seriesFormat.getItemShape() != ItemShape.NONE) {
				renderer.setSeriesShapesVisible(seriesIdx, true);
				renderer.setSeriesShape(seriesIdx, seriesFormat.getItemShape().getShape());
			} else {
				renderer.setSeriesShapesVisible(seriesIdx, false);
			}
		}

		// configure series color if necessary
		if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, colorDimensionConfig)) {
			Color itemColor = seriesFormat.getItemColor();
			renderer.setSeriesPaint(seriesIdx, itemColor);
		}
		renderer.setSeriesOutlinePaint(seriesIdx, PlotConfiguration.DEFAULT_SERIES_OUTLINE_PAINT);
		renderer.setUseOutlinePaint(true);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:43,代码来源:ChartRendererFactory.java


注:本文中的org.jfree.chart.renderer.category.LineAndShapeRenderer.setSeriesOutlinePaint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。