is there anyway to set the chart background color based on theme used in application and not hard coded to specific one. ?
Thanks
Chart background based on theme.
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: Chart background based on theme.
Only if you have some means to ask the application what the appropriate theme color is. Once you have that, just set the background color of the plot(s) in the normal manner. I cannot think of any automatic way since the color the user application might want might not be what you expect.develop wrote:is there anyway to set the chart background color based on theme used in application and not hard coded to specific one. ?
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Assuming that your "theme" is related to the PLAF, did you try something like this yet?
Code: Select all
chart.setBackgroundPaint(UIManager.getColor("control"));