# Use of JfreeChart

**URL:** <https://forum.inductiveautomation.com/t/use-of-jfreechart/11581>\
**Category:** Ignition\
**Created:** [April 26, 2016, 1:34pm UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581 "2016-04-26T13:34:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Koen](https://forum.inductiveautomation.com/u/Koen)\
**Post date:** [April 26, 2016, 1:34pm UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/1 "2016-04-26T13:34:35Z")

</div>

Hi everyone,

I realise that the charting object is based on [jfreechart.org](http://jfreechart.org). Is there a way to use the full range of charting features of the jfreechart package?

I was hoping to do some contour plot, or similar, which according to the jfreechart website is achieved through an XYPlot with XYBlockRenderer.

I assume I first create a classic chart and then use ‘configureChart’ extension function to manipulate its properties?

Would anyone have some suggestions as to how to start this? I am assuming that within the extension function I’ll have to create a new renderer, as well as an XYZDataset and then somehow write these into the chart’s properties. The renderer, I think I may be able to manage 😮 , but how do I create the XYZDataset? Will I automatically have an XYZDataset if my ClassicChart’s data is a table with 3 columns?

Cheers  
Koen

---

<div class="post-metadata">

**Author:** ![jake.brand](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jake.brand](https://forum.inductiveautomation.com/u/jake.brand)\
**Post date:** [March 21, 2017, 8:52pm UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/2 "2017-03-21T20:52:01Z")

</div>

Hello Koen,

I realize this is a bit old, but I am just starting to investigate something very similar to your post.  
If you had made any progress and are willing to share some code snippets with me I would greatly appreciate it.

Thanks,

Jake

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [March 22, 2017, 3:24pm UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/3 "2017-03-22T15:24:40Z")

</div>

It is also possible to create a new Ignition module and create a new Chart component.

Best,

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 22, 2017, 4:41pm UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/4 "2017-03-22T16:41:14Z")

</div>

[quote=“nmudge”]It is also possible to create a new Ignition module and create a new Chart component.[/quote]Yes, this is definitely the way to go. There’s a whole host of pitfalls if you end up accidentally serializing any jython classes you create in your implementation. Been there, done that. /-:  
You can safely subclass the existing chart components in a java module to minimize the new code you’ll need. My [NoteChart module](https://inductiveautomation.com/moduleshowcase/module/automation-professionals-llc-notechart) is less than 3000 LOC.

---

<div class="post-metadata">

**Author:** ![Gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Gayathri](https://forum.inductiveautomation.com/u/Gayathri)\
**Post date:** [November 11, 2021, 6:54am UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/5 "2021-11-11T06:54:04Z")

</div>

How can we get Annoted Text from Jfree Annoted Chart. When I tried **“getAnnotations()”** syntax I am getting output something in this form **"org.jfree.chart.annotations.CategoryTextAnnotation@a0943fdc"**  
How can we get the output in readable format?

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [November 11, 2021, 7:36am UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/6 "2021-11-11T07:36:17Z")

</div>

It looks like you should be able to call `.getText()` on the `CategoryTextAnnotation` in order to get the text value.

[https://www.jfree.org/jfreechart/javadoc/org/jfree/chart/annotations/CategoryTextAnnotation.html](https://www.jfree.org/jfreechart/javadoc/org/jfree/chart/annotations/CategoryTextAnnotation.html)

---

<div class="post-metadata">

**Author:** ![Gayathri](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Gayathri](https://forum.inductiveautomation.com/u/Gayathri)\
**Post date:** [September 28, 2022, 4:51am UTC](https://forum.inductiveautomation.com/t/use-of-jfreechart/11581/7 "2022-09-28T04:51:26Z")

</div>

Appreciative. Thank you!
