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


Java LineAndShapeRenderer.setShapesVisible方法代码示例

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


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

示例1: createJFreeBarChart

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
/**
 * 
 * @param pieDataset
 * @return
 */
@SuppressWarnings("deprecation")
private JFreeChart createJFreeBarChart(CategoryDataset barDataset) {
	if (this.model.isThreeDimensional() && this.model.isLineChart()) {
		return ChartFactory.createLineChart3D(this.model.getChartName(), "Category", "Value", barDataset,
				PlotOrientation.VERTICAL, true, true, false);
	} else if (this.model.isThreeDimensional() && !this.model.isLineChart()) {
		return ChartFactory.createBarChart3D(this.model.getChartName(), "Category", "Value", barDataset,
				PlotOrientation.VERTICAL, true, true, false);
	} else if (this.model.isLineChart()) {
		JFreeChart chart = ChartFactory.createLineChart(this.model.getChartName(), "Category", "Value", barDataset,
				PlotOrientation.VERTICAL, true, true, false);

		LineAndShapeRenderer renderer = (LineAndShapeRenderer) ((CategoryPlot) chart.getPlot()).getRenderer();
		renderer.setShapesVisible(true);
		renderer.setShapesFilled(true);

		return chart;
	}
	return ChartFactory.createBarChart(this.model.getChartName(), "Category", "Value", barDataset,
			PlotOrientation.VERTICAL, true, true, false);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:27,代码来源:ProviderChartFactory.java

示例2: crearLineChartAsignRescateVict

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
public  JFreeChart crearLineChartAsignRescateVict(CategoryDataset dataset) {
       
       chartNotifAsigResc = ChartFactory.createLineChart(
          "Tiempos de Notificaci�n, asiganci�n y Rescate de Victimas ",      // chart title Titulo local del grafico
          "Victimas Ordenadas por tiempo de rescate ",                      // x axis label
          "Tiempo milisegundos",                      // y axis label
          dataset,                  // data
          PlotOrientation.VERTICAL,
          true,                     // include legend
          true,                     // tooltips
          false                     // urls
      );

      // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
      ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
//        chartNotifAsigResc.setBackgroundPaint(Color.white);
       CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
//        CategoryPlot plot = chartNotifAsigResc.getCategoryPlot();
//        plot.setBackgroundPaint(Color.lightGray);
//        plot.setDomainGridlinePaint(Color.white);
//        plot.setRangeGridlinePaint(Color.white);
//        NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
//        rangeAxis.setUpperMargin(0.15);
        CategoryItemRenderer renderer = plot.getRenderer();
        renderer.setItemLabelGenerator(new LabelGenerator(50.0));
        renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
        renderer.setItemLabelsVisible(true);
//      CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
            LineAndShapeRenderer rendererl = (LineAndShapeRenderer) plot.getRenderer();
            rendererl.setShapesVisible(true);
            rendererl.setDrawOutlines(true);
            rendererl.setUseFillPaint(true);
            rendererl.setFillPaint(Color.white);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
      setContentPane(chartPanel);
      this.pack();
      RefineryUtilities.centerFrameOnScreen(this);
      this.setVisible(true);
      return chartNotifAsigResc;
    }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:41,代码来源:VisualizacionJfreechart.java

示例3: linePlt

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
public linePlt(String title, String x_title, String y_title, String Categories) throws Exception{
    super("");
   DefaultCategoryDataset dataset = new DefaultCategoryDataset();
   String[] ct = Categories.split(";");
    for(String bf: ct){
      //  if(bf.startsWith("("))
          //  bf=bf.substring(1);
       // if(bf.endsWith(")"))
          //  bf=bf.substring(0,bf.length()-1);
     dataset.addValue(new Double(jc.eval("2dbl("+jc.eval(bf.substring(0,bf.indexOf(',')))+")")),
                              bf.substring(bf.indexOf(',')+1,bf.lastIndexOf(',')),
                              bf.substring(bf.lastIndexOf(',')+1));
    }
    if(title==null)
      title = "Line Chart";
    if(y_title == null)
       y_title = "y";
    if(x_title == null)
        x_title="x";
    
      chart = ChartFactory.createLineChart(
                           title,
                           x_title,
                           y_title,
                           dataset,
                           PlotOrientation.VERTICAL, // orientation
                           false,                     // include legend
                           true,                     // tooltips?
                           false                     // URLs?
                    );
     chart.setBackgroundPaint(Color.white);
     LineAndShapeRenderer renderer = (LineAndShapeRenderer)( (CategoryPlot)chart.getPlot()).getRenderer(); 
     renderer.setShapesVisible(true);
     renderer.setDrawOutlines(true);
     renderer.setUseFillPaint(true);
     renderer.setFillPaint(Color.white);

     
     /*
     if(space!=null){
         BarRenderer renderer = (BarRenderer) ((CategoryPlot)chart.getPlot()).getRenderer();
          renderer.setItemMargin(new Double(space));
     }
     */

    
}
 
开发者ID:mathhobbit,项目名称:EditCalculateAndChart,代码行数:48,代码来源:linePlt.java

示例4: testEquals

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //导入方法依赖的package包/类
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {
    
    LineAndShapeRenderer r1 = new LineAndShapeRenderer();
    LineAndShapeRenderer r2 = new LineAndShapeRenderer();
    assertEquals(r1, r2);
    
    r1.setBaseLinesVisible(!r1.getBaseLinesVisible());
    assertFalse(r1.equals(r2));
    r2.setBaseLinesVisible(r1.getBaseLinesVisible());
    assertTrue(r1.equals(r2));
    
    r1.setSeriesLinesVisible(1, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesLinesVisible(1, true);
    assertTrue(r1.equals(r2));
    
    r1.setLinesVisible(false);
    assertFalse(r1.equals(r2));
    r2.setLinesVisible(false);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesVisible(!r1.getBaseShapesVisible());
    assertFalse(r1.equals(r2));
    r2.setBaseShapesVisible(r1.getBaseShapesVisible());
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesVisible(1, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesVisible(1, true);
    assertTrue(r1.equals(r2));
    
    r1.setShapesVisible(false);
    assertFalse(r1.equals(r2));
    r2.setShapesVisible(false);
    assertTrue(r1.equals(r2));

    r1.setShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesFilled(1, true);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(1, true);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setUseOutlinePaint(true);
    assertFalse(r1.equals(r2));
    r2.setUseOutlinePaint(true);
    assertTrue(r1.equals(r2));
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:61,代码来源:LineAndShapeRendererTests.java


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