Jump to content
JasperReports Library 7.0 is now available ×

Label in each point of a XY Line


fatih.maden

Recommended Posts

[/code]

Is it possible to add the 'Labels value' a tag(label) in each point in a Line ChartIs 

 

customizer code;

 

import net.sf.jasperreports.engine.JRChartCustomizer;import org.jfree.chart.renderer.xy.XYItemRenderer;import org.jfree.chart.JFreeChart;import org.jfree.chart.labels.XYItemLabelGenerator;import org.jfree.chart.labels.StandardXYItemLabelGenerator;import org.jfree.chart.plot.XYPlot;import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;import net.sf.jasperreports.engine.JRChart;/**** @author DECISIT*/public class LineChartItemLabelCustomizer implements JRChartCustomizer {@Overridepublic void customize(JFreeChart chart, JRChart jasperChart){    XYPlot XYPlot;     XYLineAndShapeRenderer lineAndShapeRenderer;    XYPlot = (XYPlot) chart.getPlot();    lineAndShapeRenderer= (XYLineAndShapeRenderer) XYPlot.getRenderer();    lineAndShapeRenderer.setBaseItemLabelsVisible(Boolean.TRUE);    lineAndShapeRenderer.setBaseItemLabelGenerator((XYItemLabelGenerator) new StandardXYItemLabelGenerator());}}[/code]

serial=F{id};

yvalue=F{leftlong};

 

xvalue=F{longmeter};

 

label=F{type};

A(1).png.63d8a77a5cb65707a30b8949ada12c06.png

 

 

my problem ; when I use LineChartItemLabelCustomizer class, yvalue(F{leftlong}) came in every point. but i want to get label(F{type}).

 

How can be this class, to do this??

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...