Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Autoupdating Pie Chart with jFreeChart

 
Jesse Miller
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I just discovered jFreeChart and ive been playing around with it. I am creating a PieChart that pulls information from a web service to get its data. I would like to update this chart every minute by calling the web service again and changing the dataset values. I know that once the dataset values are changed the action listener on the Pie Chart will automatically update the chart. Ive included my code, can anyone tell me how to best implement this timer? Thanks

 
Lester Burnham
Rancher
Posts: 1337
 
Jesse Miller
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, but how do I update the dataset? I see that the Series has an update function but I dont know of anything like this for a piechart dataset.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd guess that calling setValue with the same keys but different values would replace the previous values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic