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


Java XYPlot.setDomainGridlinePaint方法代码示例

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


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

示例1: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart(
			"MONA KEY SIGNATURE GRAPH", "KeySignature per users ",
			"KeyGenerating time for task(secs) ", dataset,
			PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
开发者ID:cyberheartmi9,项目名称:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代码行数:24,代码来源:KeySignatureGraph.java

示例2: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart(
			"MONA STORAGE GRAPH", "KeyGeneration per users ",
			"KeyGenerating size in Bytes", dataset,
			PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
开发者ID:cyberheartmi9,项目名称:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代码行数:24,代码来源:KeyStorageGraph.java

示例3: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart("Auditing",
			"Fraction of Invalid Responses ", "Auding time for task(ms)",
			dataset, PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
开发者ID:cyberheartmi9,项目名称:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代码行数:23,代码来源:MultiLineChart.java

示例4: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(final XYDataset dataset) {
	final JFreeChart chart = ChartFactory.createXYLineChart(
			"MONA TIME AND COST GRAPH", "KeyGeneration Cost ",
			"KeyGenerating time for task(secs)", dataset,
			PlotOrientation.VERTICAL, true, true, false);
	chart.setBackgroundPaint(Color.white);
	final XYPlot plot1 = chart.getXYPlot();
	plot1.setBackgroundPaint(Color.lightGray);
	plot1.setDomainGridlinePaint(Color.white);
	plot1.setRangeGridlinePaint(Color.white);

	final XYPlot plot2 = chart.getXYPlot();
	plot2.setBackgroundPaint(Color.lightGray);
	plot2.setDomainGridlinePaint(Color.white);
	plot2.setRangeGridlinePaint(Color.white);

	final XYPlot plot3 = chart.getXYPlot();
	plot3.setBackgroundPaint(Color.lightGray);
	plot3.setDomainGridlinePaint(Color.white);
	plot3.setRangeGridlinePaint(Color.white);

	return chart;
}
 
开发者ID:cyberheartmi9,项目名称:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代码行数:24,代码来源:TimeandCostGraph.java

示例5: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private static JFreeChart createChart(XYDataset dataset, String chartName) {
// create the chart...

if(chartName == null)
 chartName = FunctionToPlot;

JFreeChart chart = ChartFactory.createXYLineChart(
chartName,
Var,
Value,
dataset,
PlotOrientation.VERTICAL,
true,
true, 
false
);
chart.setBackgroundPaint(Color.white);

 XYPlot plot = (XYPlot) chart.getPlot();
 plot.setBackgroundPaint(Color.lightGray);
 plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
 plot.setDomainGridlinePaint(Color.white);
 plot.setRangeGridlinePaint(Color.white);
XYLineAndShapeRenderer renderer
= (XYLineAndShapeRenderer) plot.getRenderer();
//renderer.setShapesVisible(true);
//renderer.setShapesFilled(true);
// change the auto tick unit selection to integer units only...
 NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setLabelAngle(Math.PI/2.0);
 rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); // OPTIONAL CUSTOMISATION COMPLETED.
return chart;
 }
 
开发者ID:mathhobbit,项目名称:EditCalculateAndChart,代码行数:34,代码来源:grPlt.java

示例6: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset  a dataset.
 *
 * @return A chart.
 */
private static JFreeChart createChart(XYDataset dataset) {

    JFreeChart chart = ChartFactory.createTimeSeriesChart(
        "Legal & General Unit Trust Prices",  // title
        "Date",             // x-axis label
        "Price Per Unit",   // y-axis label
        dataset,            // data
        true,               // create legend?
        true,               // generate tooltips?
        false               // generate URLs?
    );

    chart.setBackgroundPaint(Color.white);

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);
    plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
    plot.setDomainCrosshairVisible(true);
    plot.setRangeCrosshairVisible(true);

    XYItemRenderer r = plot.getRenderer();
    if (r instanceof XYLineAndShapeRenderer) {
        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
        renderer.setBaseShapesVisible(true);
        renderer.setBaseShapesFilled(true);
        renderer.setDrawSeriesLineAsPath(true);
    }

    DateAxis axis = (DateAxis) plot.getDomainAxis();
    axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));

    return chart;

}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:44,代码来源:TimeSeriesChartDemo1.java

示例7: crearChartNotifAsigResc

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
public void crearChartNotifAsigResc(){
    chartNotifAsigResc = ChartFactory.createXYLineChart(
      "Peticion,Asignacion y Rescate por el equipo",      // chart title Titulo local del grafico
      "Victimas en Entorno",                      // x axis label
      "Tiempo milisegundos",                      // y axis label
      null,                  // data
      PlotOrientation.VERTICAL,
      true,                     // include legend
      true,                     // tooltips
      false                     // urls
  );

  // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
  chartNotifAsigResc.setBackgroundPaint(Color.white);   //El fondo exterior del grafico sera blanco
  //      chart1.setBackgroundPaint(Color.green);

  // get a reference to the plot for further customisation...
 XYPlot plot = chartNotifAsigResc.getXYPlot();
  plot.setBackgroundPaint(Color.lightGray); //El fondo interior del grafico sera gris
  //plot.setBackgroundPaint(Color.blue);

  plot.setDomainGridlinePaint(Color.white);  //Las lineas verticales de la cuadricula se pinta de color blanco
  plot.setRangeGridlinePaint(Color.white);  //Las lineas horizontales de la cuadricula se pintan de color blanco
  
      
  ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
  chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
  setContentPane(chartPanel);
  this.pack();
  RefineryUtilities.centerFrameOnScreen(this);
  this.setVisible(true);
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:33,代码来源:VisualizacionJfreechart.java

示例8: crearChartTiemposRescatePorRobot

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
public void crearChartTiemposRescatePorRobot(){
    chartTiemposRescatePorRobot = ChartFactory.createXYLineChart(
      "Tiempos de Rescate por Robot ",      // chart title Titulo local del grafico
      "Robots en Entorno",                      // x axis label
      "Tiempo milisegundos",                      // y axis label
      null,                  // data
      PlotOrientation.VERTICAL,
      true,                     // include legend
      true,                     // tooltips
      false                     // urls
  );
    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
  chartTiemposRescatePorRobot.setBackgroundPaint(Color.white);   //El fondo exterior del grafico sera blanco
  //      chart1.setBackgroundPaint(Color.green);

  // get a reference to the plot for further customisation...
XYPlot  plot = chartTiemposRescatePorRobot.getXYPlot();
  plot.setBackgroundPaint(Color.lightGray); //El fondo interior del grafico sera gris
  //plot.setBackgroundPaint(Color.blue);

  plot.setDomainGridlinePaint(Color.white);  //Las lineas verticales de la cuadricula se pinta de color blanco
  plot.setRangeGridlinePaint(Color.white);  //Las lineas horizontales de la cuadricula se pintan de color blanco
  
      
  ChartPanel chartPanel = new ChartPanel(chartTiemposRescatePorRobot);
  chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
  setContentPane(chartPanel);
  this.pack();
  RefineryUtilities.centerFrameOnScreen(this);
  this.setVisible(true);
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:32,代码来源:VisualizacionJfreechart.java

示例9: createChartXY

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 *
 * @param dataset
 *            the data for the chart.
 *
 * @return a chart.
 */
private JFreeChart createChartXY(final XYDataset dataset) {

	// create the chart...
	final JFreeChart chart = ChartFactory.createXYLineChart("Line Chart Demo 6", // chart
																					// title
			"X", // x axis label
			"Y", // y axis label
			dataset, // data
			PlotOrientation.VERTICAL, true, // include legend
			true, // tooltips
			false // urls
	);

	// NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
	chart.setBackgroundPaint(Color.white);

	// final StandardLegend legend = (StandardLegend) chart.getLegend();
	// legend.setDisplaySeriesShapes(true);

	// get a reference to the plot for further customisation...
	final XYPlot plot = chart.getXYPlot();
	plot.setBackgroundPaint(Color.lightGray);
	// plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
	plot.setDomainGridlinePaint(Color.white);
	plot.setRangeGridlinePaint(Color.white);

	final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setSeriesLinesVisible(0, false);
	renderer.setSeriesShapesVisible(1, false);
	plot.setRenderer(renderer);

	// change the auto tick unit selection to integer units only...
	final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
	rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
	// OPTIONAL CUSTOMISATION COMPLETED.

	return chart;

}
 
开发者ID:rototor,项目名称:pdfbox-graphics2d,代码行数:48,代码来源:MultiPageTest.java

示例10: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
/**
 * Creates a chart.
 * 
 * @param dataset  a dataset.
 * 
 * @return A chart.
 */
private static JFreeChart createChart(XYDataset dataset) {

    JFreeChart chart = ChartFactory.createTimeSeriesChart(
        "Legal & General Unit Trust Prices",  // title
        "Date",             // x-axis label
        "Price Per Unit",   // y-axis label
        dataset,            // data
        true,               // create legend?
        true,               // generate tooltips?
        false               // generate URLs?
    );

    chart.setBackgroundPaint(Color.white);

    XYPlot plot = (XYPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);
    plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
    plot.setDomainCrosshairVisible(true);
    plot.setRangeCrosshairVisible(true);
    
    XYItemRenderer r = plot.getRenderer();
    if (r instanceof XYLineAndShapeRenderer) {
        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
        renderer.setBaseShapesVisible(true);
        renderer.setBaseShapesFilled(true);
    }
    
    DateAxis axis = (DateAxis) plot.getDomainAxis();
    axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
    
    return chart;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:43,代码来源:SWTTimeSeriesDemo.java

示例11: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
protected JFreeChart createChart(XYDataset dataset) {
    // create the chart...
    final JFreeChart chart = ChartFactory.createXYLineChart("Quantidade de pixels", "Pixel", "Quantidade", dataset,
            PlotOrientation.VERTICAL, true, // include legend
            true, // tooltips
            false // urls
    );

    chart.setBackgroundPaint(java.awt.Color.white);

    // final StandardLegend legend = (StandardLegend) chart.getLegend();
    // legend.setDisplaySeriesShapes(true);

    // get a reference to the plot for further customisation...
    final XYPlot plot = chart.getXYPlot();
    plot.setBackgroundPaint(java.awt.Color.lightGray);
    // plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
    plot.setDomainGridlinePaint(java.awt.Color.white);
    plot.setRangeGridlinePaint(java.awt.Color.white);

    // change the auto tick unit selection to integer units only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    // OPTIONAL CUSTOMISATION COMPLETED.

    return chart;
}
 
开发者ID:nbfontana,项目名称:pdi,代码行数:28,代码来源:Interface.java

示例12: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(XYDataset dataset, boolean createLegend) {

		// create the chart...
		JFreeChart chart = ChartFactory.createXYLineChart(null,      // chart title
				null,                      // x axis label
				null,                      // y axis label
				dataset,                  // data
				PlotOrientation.VERTICAL, createLegend,                     // include legend
				true,                     // tooltips
				false                     // urls
				);

		chart.setBackgroundPaint(Color.white);

		// get a reference to the plot for further customization...
		XYPlot plot = (XYPlot) chart.getPlot();
		plot.setBackgroundPaint(Color.WHITE);
		plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
		plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
		plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

		DeviationRenderer renderer = new DeviationRenderer(true, false);
		Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
		if (dataset.getSeriesCount() == 1) {
			renderer.setSeriesStroke(0, stroke);
			renderer.setSeriesPaint(0, Color.RED);
			renderer.setSeriesFillPaint(0, Color.RED);
		} else {
			for (int i = 0; i < dataset.getSeriesCount(); i++) {
				renderer.setSeriesStroke(i, stroke);
				Color color = getColorProvider().getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
				renderer.setSeriesPaint(i, color);
				renderer.setSeriesFillPaint(i, color);
			}
		}
		renderer.setAlpha(0.12f);

		plot.setRenderer(renderer);

		ValueAxis valueAxis = plot.getRangeAxis();
		valueAxis.setLabelFont(LABEL_FONT_BOLD);
		valueAxis.setTickLabelFont(LABEL_FONT);

		return chart;
	}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:46,代码来源:DeviationChartPlotter.java

示例13: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(XYDataset dataset) {
	// create the chart...
	JFreeChart chart = ChartFactory.createXYLineChart(null,      // chart title
			null,                      // x axis label
			null,                      // y axis label
			dataset,                  // data
			PlotOrientation.VERTICAL, true,                     // include legend
			true,                     // tooltips
			false                     // urls
			);

	chart.setBackgroundPaint(Color.white);

	// get a reference to the plot for further customisation...
	XYPlot plot = (XYPlot) chart.getPlot();
	plot.setBackgroundPaint(Color.WHITE);
	plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
	plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
	plot.setRangeGridlinePaint(Color.LIGHT_GRAY);

	ValueAxis valueAxis = plot.getRangeAxis();
	valueAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
	valueAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

	ValueAxis domainAxis = plot.getDomainAxis();
	domainAxis.setLabelFont(PlotterAdapter.LABEL_FONT_BOLD);
	domainAxis.setTickLabelFont(PlotterAdapter.LABEL_FONT);

	DeviationRenderer renderer = new DeviationRenderer(true, false);
	Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
	if (dataset.getSeriesCount() == 1) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);
	} else if (dataset.getSeriesCount() == 2) {
		renderer.setSeriesStroke(0, stroke);
		renderer.setSeriesPaint(0, Color.RED);
		renderer.setSeriesFillPaint(0, Color.RED);

		renderer.setSeriesStroke(1, stroke);
		renderer.setSeriesPaint(1, Color.BLUE);
		renderer.setSeriesFillPaint(1, Color.BLUE);
	} else {
		for (int i = 0; i < dataset.getSeriesCount(); i++) {
			renderer.setSeriesStroke(i, stroke);
			Color color = colorProvider.getPointColor((double) i / (double) (dataset.getSeriesCount() - 1));
			renderer.setSeriesPaint(i, color);
			renderer.setSeriesFillPaint(i, color);
		}
	}
	renderer.setAlpha(0.12f);
	plot.setRenderer(renderer);

	// legend settings
	LegendTitle legend = chart.getLegend();
	if (legend != null) {
		legend.setPosition(RectangleEdge.TOP);
		legend.setFrame(BlockBorder.NONE);
		legend.setHorizontalAlignment(HorizontalAlignment.LEFT);
		legend.setItemFont(PlotterAdapter.LABEL_FONT);
	}
	return chart;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:64,代码来源:ROCChartPlotter.java

示例14: createChart

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
private JFreeChart createChart(final XYDataset dataset)
           
           {
       
       // create the chart...
       final JFreeChart chart = ChartFactory.createXYLineChart(
           "Line Chart Demo 6",      // chart title
           "X",                      // x axis label
           "Y",                      // y axis label
           dataset,                  // data
           PlotOrientation.VERTICAL,
           true,                     // include legend
           true,                     // tooltips
           false                     // urls
       );

       // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
       chart.setBackgroundPaint(Color.white);

//       final StandardLegend legend = (StandardLegend) chart.getLegend();
 //      legend.setDisplaySeriesShapes(true);
       
       // get a reference to the plot for further customisation...
       final XYPlot plot = chart.getXYPlot();
       plot.setBackgroundPaint(Color.lightGray);
   //    plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
       plot.setDomainGridlinePaint(Color.white);
       plot.setRangeGridlinePaint(Color.white);
       
       final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
       renderer.setSeriesLinesVisible(0, false);
       renderer.setSeriesShapesVisible(1, false);
       plot.setRenderer(renderer);

       // change the auto tick unit selection to integer units only...
       final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
       rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
       // OPTIONAL CUSTOMISATION COMPLETED.
               
       return chart;
       
   }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:43,代码来源:VisualizacionJfreechart.java

示例15: VisualizarEstadisticasLLegadayAsignacionVictimas

import org.jfree.chart.plot.XYPlot; //导入方法依赖的package包/类
public void VisualizarEstadisticasLLegadayAsignacionVictimas(XYDataset dataset){
  //       XYDataset xyDataset = new XYSeriesCollection(serieDatos);
        
        // Creates a SegmentedTimeline instance, the time scope is "09:30-11:30,13:00-15:00".
          JFreeChart  chart = ChartFactory.createXYLineChart(
            "Victim's Notification and Assignment to Team members ",      // chart title
            "Victim's Notification",                      // x axis label
            "Time in seconds",                      // y axis label
            dataset,                  // data
            PlotOrientation.VERTICAL,
            true,                     // include legend
            true,                     // tooltips
            false                     // urls
        );
          
          
          // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
        chart.setBackgroundPaint(Color.white);

//        final StandardLegend legend = (StandardLegend) chart.getLegend();
  //      legend.setDisplaySeriesShapes(true);
        
        // get a reference to the plot for further customisation...
        final XYPlot plot = chart.getXYPlot();
        plot.setBackgroundPaint(Color.lightGray);
    //    plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));

        
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        
        final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
        renderer.setSeriesLinesVisible(0, false);
        renderer.setSeriesShapesVisible(1, false);
        plot.setRenderer(renderer);
        // change the auto tick unit selection to integer units only...
        final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        rangeAxis.setStandardTickUnits(NumberAxis.createStandardTickUnits());
  //      final JFreeChart chart = createChart(dataset);
        final ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
        setContentPane(chartPanel);
        this.pack();
        RefineryUtilities.centerFrameOnScreen(this);
        this.setVisible(true);                                               
    }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:47,代码来源:VisualizacionJfreechart.java


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