itchytoes Posted March 26, 2008 Share Posted March 26, 2008 Hi -- On a lineChart, is there a way to display the value of the valueExpression on the chart itself over the point? Thanks Betty Link to comment Share on other sites More sharing options...
lucianc Posted March 26, 2008 Share Posted March 26, 2008 You could achieve this via a chart customizer that would do something likeCode:CategoryPlot categoryPlot = (CategoryPlot) chart.getPlot();LineAndShapeRenderer lineRenderer = (LineAndShapeRenderer) categoryPlot.getRenderer();lineRenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());lineRenderer.setItemLabelsVisible(true); Looking at the JR sources, I see that we are not using the category datset label expressions for line charts. Doing that would make sense, and if you think we should do it please log a feature request [url=http://jasperforge.org/sf/tracker/do/listArtifacts/projects.jasperreports/tracker.feature_requests]here. Regards,Lucian Link to comment Share on other sites More sharing options...
itchytoes Posted March 29, 2008 Author Share Posted March 29, 2008 Hi -- Thanks! That worked like a charm. I had already fussed with the setItemLabelsVisible(true) to no avail, because I did not know I had to create one of these BaseItemLabelGenerator thingies. Betty Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now