• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JavaFX: populate a barchart from hashmap?

 
Ranch Hand
Posts: 151
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a StackedBarChart and I'm trying to create some data for it out of a hashmap
I'm not quite sure what to do for generating the data...
the chart seems to consist of a "Series", a "Data", and an "ObservableList"

 
S Fox
Ranch Hand
Posts: 151
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using only javaFX to make the chart, not JFreeChart, just in case there's a difference in how its done.
 
Saloon Keeper
Posts: 5593
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My mistake. Accordingly, I have added the thread to the JavaFX forum rather than the open source project forum.
 
S Fox
Ranch Hand
Posts: 151
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I banged around on it for a long time and finally got it to work with this code here.
Didn't find any examples online so maybe its useful to someone as an example.
Any suggestions for improvement?

I still need to make better formatting on the chart, such as placeholders for items not represented in it.
Also I want to try adding multiple sets of data into the chart to see how it works ("series" data).


 
Greenhorn
Posts: 3
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey , would it be okay if you posted the full working code? I'm trying something similar and I seem to be having a couple of problems
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!