• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jfreechart Pie chart Not refreshing with New dataset.

 
Stanley Mungai
Ranch Hand
Posts: 155
Java Netbeans IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends, I have this Piedataset that I am creating from an Oracle database Like this:



I also have a JList on the same Screen that I have Rendered to Checkboxes and I have added a ListSelectionListener



I need the Pie chart to refresh with the New Values say if I click on one checkbox the dataset should change But My Pie chart is not refreshing. Wgat could I be doing wrong? I will appreciate example too.
 
Richard Tookey
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think about this fragment of your code -


1) Each call to createDataset() creates a new dataset which you do nothing with! You need to use it to update your chart.
2) If an exception is thrown you just ignore it.

 
Stanley Mungai
Ranch Hand
Posts: 155
Java Netbeans IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Got it thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic