JFXGraph… graphing with JavaFX
Firstly, happy new year! This is my first post for 2009, and so far the new year has been going great!
So strait into the good stuff…
As you may have seen in a previous post of mine a bar graph type of application that demonstrated the integration of Java with JavaFX.
I decided to further develop the graphing application to be far more robust.
Introducing JFXGraph the bar graphing application that makes graphing data easy (well that’s the idea).
Its really a very simple application, made up of a few classes and some CSS files.
Firstly, here is a few screen shots of the application running:
There are a few features here:
- Columns may be added dynamically
- Automatic height adjustment of the Y-axis when new columns added (if required)
- Smooth growing animation of bars
- Y-axis lines extending from the bar to the Y-axis (onmouseover each bar) for ease of view
- Entire graph is draggable via mouse
The swing button, “Add New Column” in the top left corner is just a helper button that adds a new column (up to 5 in total) to the graph so the user can see how it looks when new data is added.
The code is quite simple, there are only 2 classes that this application uses:
BarGraph, and BarGraphColumn. They are pretty self explanatory, and the code can be made available upon request (just shoot me an email…).
Below is a JNLP launcher that will allow you to see it running in its current state (I change it around a fair bit as I think of new features, bugs, etc…)
4 responses to “JFXGraph… graphing with JavaFX”
-
Hi,
Could you please provide me with the code for the following classes, BarGraph and BarGraphColumn ?
Request you to mail me the same to balaraju16@gmail.com
-
Hi Balu, I have just send you the code, enjoy…
-
Hi,
Could you please provide me with the code for the following classes, BarGraph and BarGraphColumn ?
Please can you mail me the same to rvrpatlolla14@gmail.com
-
Hi Raj, I will also send you an email regarding this, but for the sake of other readers, I would recommend that you upgrade your JavaFX runtime to 1.2 and use the Sun Charting API that they released.
They beat me to the punch, but I had a lot of fun in the process…
Im sure their graphs are a bit more robust too!
About Me
Chesung Subba
Author/Writer
Hello, I'm Chesung Subba, a passionate writer who loves sharing ideas, stories, and experiences to inspire, inform, and connect with readers through meaningful content.
Follow Me
Connect with me and be part of my social media community.



Leave a Reply