• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaFX: populate a barchart from hashmap?

 
Rancher
Posts: 285
14
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Rancher
Posts: 285
14
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Rancher
Posts: 285
14
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic