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


Java BoxAndWhiskerCategoryDataset.getRowCount方法代码示例

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


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

示例1: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入方法依赖的package包/类
private JFreeChart createBoxAndWhiskerChart(String title, String xLabel, String yLabel, BoxAndWhiskerCategoryDataset dataset) {

	    CategoryAxis domainAxis = new CategoryAxis(xLabel);
        NumberAxis rangeAxis = new NumberAxis(yLabel);

		// CategoryItemRenderer renderer = new BoxAndWhiskerRenderer();
        BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
        CategoryPlot plot = new CategoryPlot(
            dataset, domainAxis, rangeAxis, renderer
        );
        JFreeChart chart = new JFreeChart(title, plot);
 
        chart.setBackgroundPaint(Color.white);

        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setDomainGridlinesVisible(true);
        plot.setRangeGridlinePaint(Color.white);

        rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
		
		//columnCount -- category count
		//RowCount -- serie count
		if(dataset.getColumnCount()* dataset.getRowCount()<5){

			domainAxis.setLowerMargin(0.2);
			domainAxis.setUpperMargin(0.2);
	   		if (dataset.getColumnCount()==1)
				renderer.setItemMargin(0.5);
			//	domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);
		   
		/*	System.out.println("lowerMargin="+domainAxis.getLowerMargin());
			System.out.println("ItemMargin="+renderer.getItemMargin());
			System.out.println("CategoryMargin="+domainAxis.getCategoryMargin());*/
		}

		else if(dataset.getColumnCount()* dataset.getRowCount()<10){
			domainAxis.setLowerMargin(domainAxis.getLowerMargin()*2);
			domainAxis.setUpperMargin(domainAxis.getUpperMargin()*2);
	   		if (dataset.getColumnCount()==1)
				renderer.setItemMargin(renderer.getItemMargin()*2);
			else 			
				domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);
	     /*System.out.println("lowerMargin="+domainAxis.getLowerMargin());
			System.out.println("ItemMargin="+renderer.getItemMargin());
			System.out.println("CategoryMargin="+domainAxis.getCategoryMargin());
		*/
		}
		
        return chart;
    }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:52,代码来源:ChartGenerator.java

示例2: createChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入方法依赖的package包/类
/**
   * Creates a sample chart.
   * 
   * @param dataset  the dataset.
   * 
   * @return The chart.
   */
  protected JFreeChart createChart(BoxAndWhiskerCategoryDataset dataset) {
      
      CategoryAxis domainAxis = new CategoryAxis(null);
      NumberAxis rangeAxis = new NumberAxis(rangeLabel);
      BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
      CategoryPlot plot = new CategoryPlot(
          dataset, domainAxis, rangeAxis, renderer
      );
      JFreeChart chart = new JFreeChart(chartTitle, plot);
      
      chart.setBackgroundPaint(Color.white);

      plot.setBackgroundPaint(Color.lightGray);
      plot.setDomainGridlinePaint(Color.white);
      plot.setDomainGridlinesVisible(true);
      plot.setRangeGridlinePaint(Color.white);

      rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
renderer.setLegendItemLabelGenerator(new SOCRCategoryCellLabelGenerator(dataset, values_storage,SERIES_COUNT, CATEGORY_COUNT));

//RowCount -- serie count
if(dataset.getColumnCount()* dataset.getRowCount()<5){

	domainAxis.setLowerMargin(0.2);
	domainAxis.setUpperMargin(0.2);
  		if (dataset.getColumnCount()==1)
		renderer.setItemMargin(0.5);
	//	domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);
	/*		   
	System.out.println("1lowerMargin="+domainAxis.getLowerMargin());
	System.out.println("ItemMargin="+renderer.getItemMargin());
	System.out.println("CategoryMargin="+domainAxis.getCategoryMargin());*/

}

else if(dataset.getColumnCount()* dataset.getRowCount()<10){
	domainAxis.setLowerMargin(domainAxis.getLowerMargin()*2);
	domainAxis.setUpperMargin(domainAxis.getUpperMargin()*2);
  		if (dataset.getColumnCount()==1)
		renderer.setItemMargin(renderer.getItemMargin()*2);
	else 			
		domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);

	/*System.out.println("2lowerMargin="+domainAxis.getLowerMargin());
	System.out.println("ItemMargin="+renderer.getItemMargin());
	System.out.println("CategoryMargin="+domainAxis.getCategoryMargin());*/

}
	
if (legendPanelOn)
	chart.removeLegend();
      return chart;
      
  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:62,代码来源:BoxAndWhiskerChartDemo1.java

示例3: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入方法依赖的package包/类
private JFreeChart createBoxAndWhiskerChart(String title, String xLabel, String yLabel, BoxAndWhiskerCategoryDataset dataset) {

	    CategoryAxis domainAxis = new CategoryAxis(xLabel);
        NumberAxis rangeAxis = new NumberAxis(yLabel);

		// CategoryItemRenderer renderer = new BoxAndWhiskerRenderer();
        BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
        CategoryPlot plot = new CategoryPlot(
            dataset, domainAxis, rangeAxis, renderer
        );
        JFreeChart chart = new JFreeChart(title, plot);

        chart.setBackgroundPaint(Color.white);

        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setDomainGridlinesVisible(true);
        plot.setRangeGridlinePaint(Color.white);

        rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

		//columnCount -- category count
		//RowCount -- serie count
		if(dataset.getColumnCount()* dataset.getRowCount()<5){

			domainAxis.setLowerMargin(0.2);
			domainAxis.setUpperMargin(0.2);
	   		if (dataset.getColumnCount()==1)
				renderer.setItemMargin(0.5);
			//	domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);

		}

		else if(dataset.getColumnCount()* dataset.getRowCount()<10){
			domainAxis.setLowerMargin(domainAxis.getLowerMargin()*2);
			domainAxis.setUpperMargin(domainAxis.getUpperMargin()*2);
	   		if (dataset.getColumnCount()==1)
				renderer.setItemMargin(renderer.getItemMargin()*2);
			else
				domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);
		}

        return chart;
    }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:45,代码来源:ChartGenerator_JTable.java

示例4: createBoxAndWhiskerChart

import org.jfree.data.statistics.BoxAndWhiskerCategoryDataset; //导入方法依赖的package包/类
private JFreeChart createBoxAndWhiskerChart(String title, String xLabel, String yLabel, BoxAndWhiskerCategoryDataset dataset) {

	    CategoryAxis domainAxis = new CategoryAxis(xLabel);
        NumberAxis rangeAxis = new NumberAxis(yLabel);

		// CategoryItemRenderer renderer = new BoxAndWhiskerRenderer();
        BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
        CategoryPlot plot = new CategoryPlot(
            dataset, domainAxis, rangeAxis, renderer
        );
        JFreeChart chart = new JFreeChart(title, plot);

        chart.setBackgroundPaint(Color.white);

        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setDomainGridlinesVisible(true);
        plot.setRangeGridlinePaint(Color.white);

        rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

		//columnCount -- category count
		//RowCount -- serie count
		if(dataset.getColumnCount()* dataset.getRowCount()<5){

			domainAxis.setLowerMargin(0.2);
			domainAxis.setUpperMargin(0.2);
	   		if (dataset.getColumnCount()==1)
				renderer.setItemMargin(0.5);
			//	domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);

			//System.out.println("lowerMargin="+domainAxis.getLowerMargin());
			//System.out.println("ItemMargin="+renderer.getItemMargin());
			//System.out.println("CategoryMargin="+domainAxis.getCategoryMargin());

		}

		else if(dataset.getColumnCount()* dataset.getRowCount()<10){
			domainAxis.setLowerMargin(domainAxis.getLowerMargin()*2);
			domainAxis.setUpperMargin(domainAxis.getUpperMargin()*2);
	   		if (dataset.getColumnCount()==1)
				renderer.setItemMargin(renderer.getItemMargin()*2);
			else
				domainAxis.setCategoryMargin(domainAxis.getCategoryMargin()*2);
	//System.out.println("lowerMargin="+domainAxis.getLowerMargin());
			//System.out.println("ItemMargin="+renderer.getItemMargin());
			//System.out.println("CategoryMargin="+domainAxis.getCategoryMargin());

		}

        return chart;
    }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:53,代码来源:Chart.java


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