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


Java XYLineAndShapeRenderer.setSeriesLinesVisible方法代码示例

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


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

示例1: createChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
private JFreeChart createChart(XYSeriesCollection xySeriesCollection) {
    JFreeChart chart = ChartFactory.createXYLineChart(
            "PlotDemo",
            "X",
            "Y",
            xySeriesCollection,
            PlotOrientation.VERTICAL,
            true,
            true,
            false);
    chart.setBackgroundPaint(Color.white);

    //...Устанавливаем правила для серий
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setSeriesLinesVisible(2, false);
    renderer.setSeriesShapesVisible(1, false);
    renderer.setSeriesPaint(0, Color.orange);
    renderer.setSeriesPaint(1, Color.red);
    renderer.setSeriesPaint(2, Color.blue);

    XYPlot plot = chart.getXYPlot();
    plot.setOutlinePaint(Color.cyan);
    plot.setRenderer(renderer);

    return chart;
}
 
开发者ID:AllDayAlone,项目名称:Ordinary-Least-Squares-Demo,代码行数:27,代码来源:ChartOne.java

示例2: OrderParameterVsTimeChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public OrderParameterVsTimeChart( int maxItemCount ) {
    this.maxItemCount = maxItemCount;

    meanSeries = new XYSeries( "Order Parameter vs Time" );
    xySeriesCollection = new XYSeriesCollection( meanSeries );
    domainAxis = new NumberAxis( "Time" );
    rangeAxis = new NumberAxis( "Order Parameter" );
    renderer = new XYLineAndShapeRenderer();

    int MEAN_SERIES = 0;
    renderer.setSeriesStroke( MEAN_SERIES, new BasicStroke( 2 ) );
    renderer.setSeriesLinesVisible( MEAN_SERIES, true );
    renderer.setSeriesShapesVisible( MEAN_SERIES, false );

    xyPlot = new XYPlot( xySeriesCollection,
                         domainAxis,
                         rangeAxis, renderer );
    chart = new JFreeChart( "Order Parameter vs. Time", xyPlot );
    rangeAxis.setRange( -0.01, 1.01 );
    domainAxis.setAutoRange( false );
    domainAxis.setRange( 0, maxItemCount * PlotOrderParameterVsTime.MOD );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:23,代码来源:OrderParameterVsTimeChart.java

示例3: createChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
/**
 * Creates a sample chart.
 *
 * @param dataset a dataset for the chart.
 * @return A sample chart.
 */
private static JFreeChart createChart( XYDataset dataset ) {
    JFreeChart chart = ChartFactory.createXYLineChart(
            "XYLineAndShapeRenderer Demo 1",
            "X",
            "Y",
            dataset,
            PlotOrientation.VERTICAL,
            true,
            true,
            false
    );
    XYPlot plot = (XYPlot)chart.getPlot();
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setSeriesLinesVisible( 0, true );
    renderer.setSeriesShapesVisible( 0, false );
    renderer.setSeriesLinesVisible( 1, true );
    renderer.setSeriesShapesVisible( 1, false );
    renderer.setToolTipGenerator( new StandardXYToolTipGenerator() );
    renderer.setDefaultEntityRadius( 6 );
    plot.setRenderer( renderer );
    return chart;
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:29,代码来源:XYLineAndShapeRendererDemo1.java

示例4: createFitJFreeCharts

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
private void createFitJFreeCharts(XYSeriesCollection viSeriesCollection) {
    for (int csvCount = 0; csvCount < csvFiles.length; csvCount++) {
        // create chart
        XYSeriesCollection xysc = new XYSeriesCollection();
        xysc.addSeries(viSeriesCollection.getSeries(bestFittingScenarios[csvCount].getScenarioIndex() + csvFiles.length));
        xysc.addSeries(viSeriesCollection.getSeries(csvCount));
        JFreeChart fcchart = ChartFactory.createXYLineChart("Fitting i(v) curve to csv #" + csvCount, "v (V)", "i (mA)",
                xysc, PlotOrientation.VERTICAL, false, true, true);
        XYLineAndShapeRenderer bfsRenderer = new XYLineAndShapeRenderer();
        bfsRenderer.setSeriesShapesVisible(0, false);
        bfsRenderer.setSeriesLinesVisible(0, true);
        bfsRenderer.setSeriesShapesVisible(1, true);
        bfsRenderer.setSeriesLinesVisible(1, true);
        fcchart.getXYPlot().setRenderer(bfsRenderer);
        applyXYChartTheme(fcchart, logI, minIPlotted);
        allCharts.add(fcchart);
    }
}
 
开发者ID:fgr1986,项目名称:maf,代码行数:19,代码来源:DCThreadManagerPlotter.java

示例5: SmoothingChartContainer

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public SmoothingChartContainer()
{
	dataset = new DefaultXYDataset();
	dataset.addSeries(NOISY_SERIES_KEY, new double[][] {{0},{0}});
	dataset.addSeries(SMOOTH_SERIES_KEY, new double[][] {{0},{0}});

	noisySeriesIndex = 0;
	smoothSeriesIndex = 1;
	
	renderer = new XYLineAndShapeRenderer();
	XYPlot plot = new XYPlot(dataset, new NumberAxis("Time"), new NumberAxis(), renderer);
	chart = new JFreeChart(plot);
	plot.setDrawingSupplier(ChartUtils.createDrawingSupplier());
	
	renderer.setSeriesLinesVisible(noisySeriesIndex, false);
	renderer.setSeriesShapesVisible(noisySeriesIndex, true);
	
	renderer.setSeriesLinesVisible(smoothSeriesIndex, true);
	renderer.setSeriesShapesVisible(smoothSeriesIndex, false);
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:21,代码来源:SmoothingChartContainer.java

示例6: TwoHistChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public TwoHistChart(MakamBox obj,MakamBox recObj,boolean withTemplate) throws Exception{
	chartSong = obj.getHistogramChart();
	chartRec = recObj.getHistogramChart();
	chartSong.createOnlyChart(withTemplate);
	chartRec.createOnlyChart(false);
	renderer = new XYLineAndShapeRenderer();
	renderer.setSeriesPaint(0, Color.BLACK);
	renderer.setSeriesLinesVisible(0, true);
    renderer.setSeriesShapesVisible(0, false);
    renderer.setSeriesLinesVisible(1, false);
    renderer.setSeriesShapesVisible(1, true);
    renderer.setSeriesLinesVisible(2, false);
    renderer.setSeriesShapesVisible(2, true);
    renderer.setSeriesLinesVisible(3, false);
    renderer.setSeriesShapesVisible(3, true);
    collectionRec = chartRec.getCollection();
    plot = (XYPlot) chartSong.getChart().getPlot();
    plot.setDataset(1,collectionRec);
    plot.setRenderer(1,renderer);
    frameName = "Song Histogram & Record Histogram";
    repaint();
}
 
开发者ID:miracatici,项目名称:MakamBox,代码行数:23,代码来源:TwoHistChart.java

示例7: addSerie

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public void addSerie(int indexSerie, Color color, XYSeries localXYSeries){    	
        XYSeriesCollection localXYSeriesCollection = new XYSeriesCollection();
        localXYSeriesCollection.addSeries(localXYSeries);     //Se aniade la serie

        Ellipse2D.Double localDouble = new Ellipse2D.Double(-4.0D, -4.0D, 8.0D, 8.0D); //Forma de la anotacion del punto x,y
        
        XYLineAndShapeRenderer localXYLineAndShapeRenderer = new XYLineAndShapeRenderer();

        localXYLineAndShapeRenderer.setSeriesLinesVisible(indexSerie,true);        //provoca que se pinten lineas rectas que unen los puntos x,y que conforman la serie
        localXYLineAndShapeRenderer.setSeriesShapesVisible(indexSerie,false);       //provoca que se pinte la forma asociada al punto x,y       

        plot.setDataset(indexSerie, localXYSeriesCollection);  //Se aniade la serie al plot
        plot.setRenderer(indexSerie, localXYLineAndShapeRenderer);

        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0));
        
//        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, localDouble);
        
        
        localXYLineAndShapeRenderer.setSeriesPaint(indexSerie, color);
        //localXYLineAndShapeRenderer.setSeriesFillPaint(indexSerie, Color.yellow);
        //localXYLineAndShapeRenderer.setSeriesOutlinePaint(indexSerie, Color.gray);
        localXYLineAndShapeRenderer.setUseFillPaint(false);//true
        localXYLineAndShapeRenderer.setUseOutlinePaint(false);//true
        localXYLineAndShapeRenderer.setDrawOutlines(false);
        localXYLineAndShapeRenderer.setDrawSeriesLineAsPath(true);                       
    }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:28,代码来源:VisualizacionJfreechart.java

示例8: addSerie

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public void addSerie(int indexSerie, Color color, XYSeries localXYSeries){ 
        XYPlot plot=null;
        XYSeriesCollection localXYSeriesCollection = new XYSeriesCollection();
        localXYSeriesCollection.addSeries(localXYSeries);     //Se aniade la serie

        Ellipse2D.Double localDouble = new Ellipse2D.Double(-4.0D, -4.0D, 8.0D, 8.0D); //Forma de la anotacion del punto x,y
        
        XYLineAndShapeRenderer localXYLineAndShapeRenderer = new XYLineAndShapeRenderer();

        localXYLineAndShapeRenderer.setSeriesLinesVisible(indexSerie,true);        //provoca que se pinten lineas rectas que unen los puntos x,y que conforman la serie
        localXYLineAndShapeRenderer.setSeriesShapesVisible(indexSerie,false);       //provoca que se pinte la forma asociada al punto x,y       

        plot.setDataset(indexSerie, localXYSeriesCollection);  //Se aniade la serie al plot
        plot.setRenderer(indexSerie, localXYLineAndShapeRenderer);

        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0));
        
//        localXYLineAndShapeRenderer.setSeriesShape(indexSerie, localDouble);
        
        
        localXYLineAndShapeRenderer.setSeriesPaint(indexSerie, color);
        //localXYLineAndShapeRenderer.setSeriesFillPaint(indexSerie, Color.yellow);
        //localXYLineAndShapeRenderer.setSeriesOutlinePaint(indexSerie, Color.gray);
        localXYLineAndShapeRenderer.setUseFillPaint(false);//true
        localXYLineAndShapeRenderer.setUseOutlinePaint(false);//true
        localXYLineAndShapeRenderer.setDrawOutlines(false);
        localXYLineAndShapeRenderer.setDrawSeriesLineAsPath(true);                       
    }
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:29,代码来源:VisualizacionJfreechart.java

示例9: createChartXY

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的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: editRenderer

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
/**
 * Edit the parameters in the renderer
 * @param i
 * @param dotSize
 * @param p
 */
public void editRenderer(int i, int dotSize, Paint p, boolean drawLines, boolean drawShapes){
	XYLineAndShapeRenderer rend = renderers.get(i);
	rend.setSeriesPaint(0, p);
	rend.setSeriesShape(0, new Ellipse2D.Double(0, 0, dotSize, dotSize));
	rend.setSeriesStroke(0, new BasicStroke(2));
	rend.setSeriesLinesVisible(0, drawLines);
	rend.setSeriesShapesVisible(0, drawShapes);
}
 
开发者ID:seqcode,项目名称:seqcode-core,代码行数:15,代码来源:ScatterData.java

示例11: OrderParameterVsRandomnessChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
public OrderParameterVsRandomnessChart( int maxItemCount ) {
    this.maxItemCount = maxItemCount;

    meanSeries = new XYSeries( "Raw Data" );
    lineSeries = new XYSeries( "Mean Values" );
    xySeriesCollection = new XYSeriesCollection( meanSeries );

    xySeriesCollection.addSeries( lineSeries );
    domainAxis = new NumberAxis( "Randomness" );
    rangeAxis = new NumberAxis( "Order Parameter" );
    renderer = new XYLineAndShapeRenderer();

    int RAW_DATA_SERIES = 0;
    int LINE_SERIES = 1;
    renderer.setSeriesShape( RAW_DATA_SERIES, new Ellipse2D.Double( -3, -3, 6, 6 ) );
    renderer.setSeriesShape( LINE_SERIES, new Rectangle( -4, -4, 8, 8 ) );
    renderer.setSeriesLinesVisible( RAW_DATA_SERIES, false );
    renderer.setSeriesShapesVisible( RAW_DATA_SERIES, true );
    Color blue = new Color( 0, 0, 255, 14 );
    renderer.setSeriesPaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesItemLabelPaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesOutlinePaint( RAW_DATA_SERIES, blue );
    renderer.setSeriesLinesVisible( LINE_SERIES, true );
    xyPlot = new XYPlot( xySeriesCollection,
                         domainAxis,
                         rangeAxis, renderer );
    chart = new JFreeChart( "Order Parameter vs. Randomness", xyPlot );
    rangeAxis.setRange( -0.01, 1.01 );
    domainAxis.setAutoRange( false );
    domainAxis.setRange( 0 - 0.01, Math.PI * 2 + 0.01 );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:32,代码来源:OrderParameterVsRandomnessChart.java

示例12: setupChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
private void setupChart(String pInitialId, XYDataset pInitialDataset) {
    chart = ChartFactory.createTimeSeriesChart(
            "Spielerstatistiken", // title
            "Zeiten", // x-axis label
            pInitialId, // y-axis label
            pInitialDataset, // data
            jShowLegend.isSelected(), // create legend?
            true, // generate tooltips?
            false // generate URLs?
            );
    
    chart.setBackgroundPaint(Constants.DS_BACK);
    XYPlot plot = (XYPlot) chart.getPlot();
    setupPlotDrawing(plot);
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    for (int i = 0; i < plot.getSeriesCount(); i++) {
        renderer.setSeriesLinesVisible(i, jShowLines.isSelected());
        renderer.setSeriesShapesVisible(i, jShowDataPoints.isSelected());
        plot.setRenderer(i, renderer);
    }
    
    renderer.setBaseItemLabelsVisible(jShowItemValues.isSelected());
    renderer.setBaseItemLabelGenerator(new org.jfree.chart.labels.StandardXYItemLabelGenerator());
    renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"), NumberFormat.getInstance()));
    int lastDataset = plot.getDatasetCount() - 1;
    if (lastDataset > 0) {
        plot.getRangeAxis().setAxisLinePaint(plot.getLegendItems().get(lastDataset).getLinePaint());
        plot.getRangeAxis().setLabelPaint(plot.getLegendItems().get(lastDataset).getLinePaint());
        plot.getRangeAxis().setTickLabelPaint(plot.getLegendItems().get(lastDataset).getLinePaint());
        plot.getRangeAxis().setTickMarkPaint(plot.getLegendItems().get(lastDataset).getLinePaint());
    }
    NumberFormat nf = NumberFormat.getInstance();
    nf.setMinimumFractionDigits(0);
    nf.setMaximumFractionDigits(0);
    NumberAxis na = ((NumberAxis) plot.getRangeAxis());
    if (na != null) {
        na.setNumberFormatOverride(nf);
    }
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:40,代码来源:DSWorkbenchStatsFrame.java

示例13: addDataset

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
private void addDataset(String pId, XYDataset pDataset) {
    if (chart == null) {
        setupChart(pId, pDataset);
    } else {
        XYPlot plot = (XYPlot) chart.getPlot();
        plot.setDataset(plot.getDatasetCount(), pDataset);
        NumberAxis axis = new NumberAxis(pId);
        NumberFormat nf = NumberFormat.getInstance();
        nf.setMinimumFractionDigits(0);
        nf.setMaximumFractionDigits(0);
        axis.setNumberFormatOverride(nf);
        plot.setRangeAxis(plot.getDatasetCount() - 1, axis);
        plot.setRangeAxisLocation(plot.getDatasetCount() - 1, AxisLocation.TOP_OR_LEFT);
        plot.mapDatasetToRangeAxis(plot.getDatasetCount() - 1, plot.getDatasetCount() - 1);
        XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
        renderer.setSeriesLinesVisible(0, jShowLines.isSelected());
        renderer.setSeriesShapesVisible(0, jShowDataPoints.isSelected());
        plot.setRenderer(plot.getDatasetCount() - 1, renderer);
        renderer.setBaseItemLabelsVisible(jShowItemValues.isSelected());
        renderer.setBaseItemLabelGenerator(new org.jfree.chart.labels.StandardXYItemLabelGenerator());
        renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, new SimpleDateFormat("dd.MM.yyyy HH:mm:ss"), NumberFormat.getInstance()));
        axis.setAxisLinePaint(plot.getLegendItems().get(plot.getDatasetCount() - 1).getLinePaint());
        axis.setLabelPaint(plot.getLegendItems().get(plot.getDatasetCount() - 1).getLinePaint());
        axis.setTickLabelPaint(plot.getLegendItems().get(plot.getDatasetCount() - 1).getLinePaint());
        axis.setTickMarkPaint(plot.getLegendItems().get(plot.getDatasetCount() - 1).getLinePaint());
    }
}
 
开发者ID:Torridity,项目名称:dsworkbench,代码行数:28,代码来源:DSWorkbenchStatsFrame.java

示例14: styleChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
/**
 * Changes various appearance settings that are common to all the trace
 * charts.
 * 
 * @param chart
 *            A {@link JFreeChart} for which the common trace style is to be
 *            applied.
 * @return A {@link JFreeChart} that has the common trace style.
 */
protected JFreeChart styleChart(JFreeChart chart) {
	super.styleChart(chart);

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

	renderer = new XYLineAndShapeRenderer();

	plot.setDomainGridlinesVisible(true);
	plot.setDomainGridlinePaint(Color.lightGray);
	plot.setRenderer(renderer);

	LegendItemCollection legendItems = plot.getLegendItems();
	for (int i = 0; i < legendItems.getItemCount(); i++) {
		int seriesIndex = legendItems.get(i).getSeriesIndex();
		renderer.setSeriesLinesVisible(seriesIndex, true);
		renderer.setSeriesShapesVisible(seriesIndex, true);
		Color seriesColor = (Color) renderer.lookupSeriesPaint(seriesIndex);
		colorPalette.add(seriesColor);
	}

	// Customize the domain axis
	final ValueAxis domainAxis = plot.getDomainAxis();
	domainAxis.setTickMarksVisible(true);
	domainAxis.setAxisLineVisible(true);
	domainAxis.setLowerMargin(0.0);
	
	// Customize the range axis
	final ValueAxis rangeAxis = plot.getRangeAxis();
	rangeAxis.setStandardTickUnits(rangeAxis.getStandardTickUnits());

	return chart;
}
 
开发者ID:modsim,项目名称:vizardous,代码行数:44,代码来源:TraceChart2D.java

示例15: createChart

import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer; //导入方法依赖的package包/类
/**
 * Creates a chart.
 * 
 * @param dataset
 *            the data for the chart.
 * 
 * @return a chart.
 */
private JFreeChart createChart(final XYDataset dataset) {
	chart = ChartFactory.createXYLineChart(String.valueOf(channelNum), // chart title
			"t", // x axis label
			"v", // y axis label
			dataset, // data
			PlotOrientation.VERTICAL, false, // include legend
			true, // tooltips
			false // urls
	);

	chart.setBackgroundPaint(Color.white);

	plot = chart.getXYPlot();
	plot.setBackgroundPaint(Color.white);
	plot.setDomainGridlinePaint(Color.black);
	plot.setRangeGridlinePaint(Color.black);
	plot.getRangeAxis().setVisible(true);
	plot.getDomainAxis().setVisible(true);
	
	final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
	renderer.setSeriesLinesVisible(0, true);
	renderer.setSeriesShapesVisible(1, true);
	plot.setRenderer(renderer);

	final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
	rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

	return chart;

}
 
开发者ID:davekirkwood,项目名称:JNI-for-NI-Drivers,代码行数:39,代码来源:NIChartPanel.java


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