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


Java StackedBarRenderer.setDrawBarOutline方法代码示例

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


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

示例1: createChart

import org.jfree.chart.renderer.category.StackedBarRenderer; //导入方法依赖的package包/类
/**
   * Creates a sample chart.
   * 
   * @param dataset  the dataset for the chart.
   * 
   * @return a sample chart.
   */
  protected JFreeChart createChart(CategoryDataset dataset) {

      JFreeChart chart = ChartFactory.createStackedBarChart(
          chartTitle,  // chart title
          domainLabel,                  // domain axis label
          rangeLabel,                     // range axis label
          dataset,                     // data
          PlotOrientation.VERTICAL,    // the plot orientation
          !legendPanelOn,                        // legend
          true,                        // tooltips
          false                        // urls
      );
      chart.setBackgroundPaint(Color.white);
      CategoryPlot plot = (CategoryPlot) chart.getPlot();
      plot.setBackgroundPaint(Color.lightGray);
      plot.setRangeGridlinePaint(Color.white);
      
      StackedBarRenderer renderer = (StackedBarRenderer) plot.getRenderer();
      renderer.setDrawBarOutline(false);
      renderer.setBaseItemLabelsVisible(true);
      renderer.setSeriesItemLabelGenerator(0, new StandardCategoryItemLabelGenerator());
renderer.setLegendItemLabelGenerator(new SOCRCategorySeriesLabelGenerator());

setCategorySummary(dataset);
      return chart;
      
  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:35,代码来源:StackedBarChartDemo1.java

示例2: createChart

import org.jfree.chart.renderer.category.StackedBarRenderer; //导入方法依赖的package包/类
private static JFreeChart createChart(GraphDataItem item, CategoryDataset categorydataset) {
		JFreeChart jfreechart = ChartFactory.createStackedBarChart(item.getTitle(), item.getLineXName(),
				item.getLineYName(), categorydataset, PlotOrientation.VERTICAL, true, true, false);

		Font font = new Font("宋体", Font.PLAIN, 13);
		jfreechart.getTitle().setFont(font);
		jfreechart.getLegend().setItemFont(font);

		CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot();
		categoryplot.getDomainAxis().setTickLabelFont(font);
		categoryplot.getDomainAxis().setLabelFont(font);
		categoryplot.getDomainAxis().setCategoryLabelPositions(
				CategoryLabelPositions.createUpRotationLabelPositions(0.392D));
		categoryplot.getRangeAxis().setTickLabelFont(font);
		categoryplot.getRangeAxis().setLabelFont(font);
		categoryplot.setBackgroundPaint(ChartColor.WHITE);

		StackedBarRenderer stackedbarrenderer = (StackedBarRenderer) categoryplot.getRenderer();
		stackedbarrenderer.setDrawBarOutline(false);
		stackedbarrenderer.setBaseItemLabelsVisible(true);
		stackedbarrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());

//		int index = 0;
//		for (Object name : item.getDatas().keySet()) {
//			stackedbarrenderer
//					.setSeriesPaint(categorydataset.getRowIndex((String) name), COLORS[index % COLORS.length]);
//			index++;
//
//		}

		return jfreechart;
	}
 
开发者ID:jdepend,项目名称:cooper,代码行数:33,代码来源:BarCreater.java

示例3: makeSequenceLogo

import org.jfree.chart.renderer.category.StackedBarRenderer; //导入方法依赖的package包/类
/**
 * Creates the logo instance
 */
private void makeSequenceLogo()
{

	CategoryDataset dataSet = prepareData();

	chart = ChartFactory.createStackedBarChart(
			null,
			"", 
			this.asBit ? "Bit Score" : "Frequency",
			dataSet, 
			PlotOrientation.VERTICAL, 
			false, 
			true, 
			false
			);

	//set modified painter 
	StackedBarRenderer renderer = new StackedBarRenderer(); 
	renderer.setBarPainter(new LogoBarPainter(letter_matrix));
	chart.getCategoryPlot().setRenderer(renderer);
	
	//disable shadows
	renderer.setShadowVisible(false); 
	
	CategoryPlot plot = chart.getCategoryPlot();

	//space between bars
	plot.getDomainAxis().setCategoryMargin(0.05);
	plot.getDomainAxis().setLowerMargin(0.01);
	plot.getDomainAxis().setUpperMargin(0.01);
	

	//paint outlines around letters
	renderer.setDrawBarOutline(false);
	
       //background, transparent
       plot.setBackgroundPaint(null);
       plot.setBackgroundAlpha(0.0f);
       chart.setBackgroundPaint(null);
       
       //remove horizontal lines
     	plot.setDomainGridlinesVisible(false);
     	plot.setRangeGridlinesVisible(false);
       
       //disable border
       plot.setOutlineVisible(false);
	
       //rotate category axis 45 degrees, but only for context
       if (letters == contexts)
       {
       	CategoryAxis domainAxis = plot.getDomainAxis();
       	domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
       }
       
       //y axis ticks
       NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
       rangeAxis.setTickUnit(new NumberTickUnit(1));
       
	//ranges
	if (this.asBit)
	{
		plot.getRangeAxis().setRange(0, 2);
	}
	else
	{
		plot.getRangeAxis().setRange(0, 1);	
	}
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:72,代码来源:Logo.java

示例4: getRawLogoPanel

import org.jfree.chart.renderer.category.StackedBarRenderer; //导入方法依赖的package包/类
public ChartPanel getRawLogoPanel()
{

	CategoryDataset dataSet = prepareData();

	JFreeChart rawchart = ChartFactory.createStackedBarChart(
			null,
			"", 
			null,
			dataSet, 
			PlotOrientation.VERTICAL, 
			false, 
			true, 
			false
			);

	//set modified painter 
	StackedBarRenderer renderer = new StackedBarRenderer(); 
	renderer.setBarPainter(new LogoBarPainter(letter_matrix));
	rawchart.getCategoryPlot().setRenderer(renderer);
	
	//disable shadows
	renderer.setShadowVisible(false); 
	
	CategoryPlot plot = rawchart.getCategoryPlot();

	//space between bars
	plot.getDomainAxis().setCategoryMargin(0.05);
	plot.getDomainAxis().setLowerMargin(0.01);
	plot.getDomainAxis().setUpperMargin(0.01);
	

	//paint outlines around letters
	renderer.setDrawBarOutline(false);
	
       //background, transparent
       plot.setBackgroundPaint(null);
       plot.setBackgroundAlpha(0.0f);
       rawchart.setBackgroundPaint(null);
       
       //disable border
       plot.setOutlineVisible(false);
	       
       //remove axis ticks
       plot.getRangeAxis().setVisible(false);
       plot.getDomainAxis().setVisible(false);

       
	//ranges
	if (this.asBit)
	{
		plot.getRangeAxis().setRange(0, 2);
	}
	else
	{
		plot.getRangeAxis().setRange(0, 1);	
	}
	
	return new ChartPanel(rawchart);
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:61,代码来源:Logo.java

示例5: getSummaryLogoPanel

import org.jfree.chart.renderer.category.StackedBarRenderer; //导入方法依赖的package包/类
public ChartPanel getSummaryLogoPanel()
{

	CategoryDataset dataSet = prepareData();

	JFreeChart rawchart = ChartFactory.createStackedBarChart(
			null,
			"", 
			null,
			dataSet, 
			PlotOrientation.VERTICAL, 
			false, 
			true, 
			false
			);

	//set modified painter 
	StackedBarRenderer renderer = new StackedBarRenderer(); 
	renderer.setBarPainter(new LogoBarPainter(letter_matrix));
	rawchart.getCategoryPlot().setRenderer(renderer);
	
	//disable shadows
	renderer.setShadowVisible(false); 
	
	CategoryPlot plot = rawchart.getCategoryPlot();

	//space between bars
	plot.getDomainAxis().setCategoryMargin(0.05);
	plot.getDomainAxis().setLowerMargin(0.01);
	plot.getDomainAxis().setUpperMargin(0.01);
	
	//remove horizontal lines
	plot.setDomainGridlinesVisible(false);
	plot.setRangeGridlinesVisible(false);
	
	
	//paint outlines around letters
	renderer.setDrawBarOutline(false);
	
       //background, transparent
       plot.setBackgroundPaint(null);
       plot.setBackgroundAlpha(0.0f);
       rawchart.setBackgroundPaint(null);
       
       //disable border
       plot.setOutlineVisible(false);
	       
       //axis ticks
       plot.getRangeAxis().setVisible(true);
       plot.getDomainAxis().setVisible(true);

       
	//ranges
	if (this.asBit)
	{
		plot.getRangeAxis().setRange(0, 2);
	}
	else
	{
		plot.getRangeAxis().setRange(0, 1);	
	}
	
	return new ChartPanel(rawchart);
}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:65,代码来源:Logo.java


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