Dynamically changing color of individual points
-
- Posts: 2
- Joined: Mon Oct 27, 2014 9:24 pm
- antibot: No, of course not.
Dynamically changing color of individual points
I was wondering how I would be able to dynamically change the color of individual points dynamically (so after it is initially created). From what I've gathered, it may have to do with extending XYLineAndShapeRenderer or overriding a method or two from the class.
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
-
- Posts: 2
- Joined: Mon Oct 27, 2014 9:24 pm
- antibot: No, of course not.
Re: Dynamically changing color of individual points
I don't understand from the second example. How do I change the renderer and then change the plot? Do I make the change to my renderer and then add the renderer again to the plot?
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Re: Dynamically changing color of individual points
It depends on what you want to do. Changes to the underlying dataset will notify a listening ChartPanel to update the chart. Any changes you've made to the renderer will be applied accordingly.