0

I am using Pentaho Report Designer (PRD) and a JFreeChart CategoryPlot. Does anyone know how to set a border around value label? The image shows the expected output.

Expected Result

I need a border around last value of bar chart (circled) using Pentaho Report Designer or using JFreeChart.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
Developer
  • 1
  • 2
  • Have you looked at a suitable one of the `org.jfree.chart.annotations`? – trashgod Jul 22 '20 at 12:15
  • Hi @trashgod... i am new in pentaho report as well as jfree...can you please explain me with example? – Developer Jul 22 '20 at 12:30
  • I don't use [tag:pentaho], but annotation examples may be found in the [tag:jfreechart] [demo](https://stackoverflow.com/tags/jfreechart/info) and [here](https://stackoverflow.com/search?q=%5Bjfreechart%5D+org.jfree.chart.annotations). – trashgod Jul 22 '20 at 16:15
  • @trashgod.. Can you please explain how to use annotations in this issue?? – Developer Jul 22 '20 at 17:33
  • I don't know [tag:pentaho]; an [mcve] might make it easier for someone who knows pentaho; here are more [examples](https://stackoverflow.com/search?tab=votes&q=user%3a230513%20%5bjfreechart%5d%20annotation); what have you tried so far? – trashgod Jul 22 '20 at 22:11
  • @trashgod its ok you can explain me this problem with example in Jfree... You can use Jfree chart as source code to explain this example. – Developer Jul 23 '20 at 05:02
  • @trashgod here https://stackoverflow.com/questions/35204012/how-to-change-the-color-of-multiple-ellipses-using-a-loop-jfreechart is example of ellipse.. but i don't know how to use it as value label border of bar chart... can you please explain me this with Jfree code Example? – Developer Jul 23 '20 at 05:07
  • Yes, `XYShapeAnnotation` is a good choice for `XYPlot`; also consider using `CategoryPointerAnnotation` for `CategoryPlot`; it's not clear which you're using; in any case, please [edit] your question to include a [mcve] that shows your use case and chosen approach. – trashgod Jul 23 '20 at 09:10
  • @trashgod Yes i want code using CategoryPlot...assume that i want a bar chart whose value label contain ellipse border.(same as image)...sorry to say but i am not able to share my code... as it is not in sharable. – Developer Jul 23 '20 at 10:07
  • I don't see a `Shape` annotation for `CategoryPlot`; you may be able to create a category annotation with a custom `draw()` implementation; I don't have an example, but you might look at the existing source and [here](http://www.jfree.org/forum/search.php?keywords=extends+AbstractAnnotation). – trashgod Jul 23 '20 at 10:23
  • @trashgod i am new in Jfree i am not able to get without example...please help me it means a lot to me,.. Thanks in advance – Developer Jul 23 '20 at 10:50
  • I don't understand; I've cited numerous examples. – trashgod Jul 23 '20 at 11:27

0 Answers0