No lines using XYSplineRenderer?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Phina Le
Posts: 1
Joined: Thu Oct 05, 2017 3:55 am
antibot: No, of course not.

No lines using XYSplineRenderer?

Post by Phina Le » Thu Oct 05, 2017 4:41 am

Hello, I am using JFreeChart V1.0.19, and have tried to use the XYSplineRenderer to render smooth curved lines for multiple series in my line chart.

However the issue is that no lines show up, only shapes at the coordinates that my program inputs. I thought it was an issue with my code or that I was missing some kind of DrawLine method, however, this issue seemed to happen with another user on this forum as a result of the update to 1.0.19.
Post located here: http://www.jfree.org/phpBB2/viewtopic.p ... er#p180530

Here is an image of how the lines look like when I use XYSplineRenderer.
http://i50.photobucket.com/albums/f317/ ... zbndgw.png

Here is the part of the code where I switch to XYSplineRenderer:

Code: Select all

ArrayList<XYValues> values = Parser.parse(files);
		theDataset= JFreeChartLineChartExample.createDataset(values);

		//LineChart
        JFreeChart lineChart = ChartFactory.createXYLineChart(  "E-Field VH",   				//Title of chart
        														"Electric Field  (v/m)",		//X-Axis Label
        														"Normalized Volume (Decimal)", 	//Y-Axis Label
        														theDataset, 					//(X, Y) Coordinates
        														PlotOrientation.VERTICAL, 		//Plot Orientation
        														true, 							//Toggle Legend
        														true, 							//Toggle ToolTips
        														false);							//Toggle Boolean Urls
        // CHARTPANEL
        ChartPanel chartPanel = new ChartPanel(lineChart);
        
    
        //XYPlot
        xyplot = lineChart.getXYPlot();
        
        xyplot.setDomainGridlineStroke(new BasicStroke(0.1f));
		xyplot.setRangeGridlineStroke(new BasicStroke(0.1f));

		xyplot.setRenderer(new XYSplineRenderer(2));
		
If there is some kind of method to fix the error, please let me know. Looking at other usages of XYSplineRenderer however, they simply seemed to just switch the renderer and set the precision like I did.

Locked