Moin, moin!
I would like to do the following:
I have a TimeSeriesChart with several series. The user is able to set the
setSeriesVisible() flag for each of them. Now I would like, that if the user selects
the 'Auto Range' from the popup menu, only the visible series are taken into account.
Does anyone knows how to do this?
torkus
How to use auto range without invisible series?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
That is an enhancement that needs to be made to JFreeChart.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: How to use auto range without invisible series?
David first I'd like to thank you for creating JFreeChart. I have purchased the developer guide twice over the past few years and have used JFreeChart on multiple projects.
I am currently trying to implement the Auto Range for visible series only feature. I have download the latest source code and I am ready to implement the check for calculating the auto range from only visible values. Do you have any suggestions or ideas on how you planned to implement it? I would be glad to do the code changes and then submit my changes to be included with the next release of JFreeChart.
The project I am working on is the DAQ Data Analyzer. You can view my blog about it at: http://gibsonsystems.com/sblog. Any suggestions or guidance would be greatly appreciated.
Thanks,
Brad Gibson
I am currently trying to implement the Auto Range for visible series only feature. I have download the latest source code and I am ready to implement the check for calculating the auto range from only visible values. Do you have any suggestions or ideas on how you planned to implement it? I would be glad to do the code changes and then submit my changes to be included with the next release of JFreeChart.
The project I am working on is the DAQ Data Analyzer. You can view my blog about it at: http://gibsonsystems.com/sblog. Any suggestions or guidance would be greatly appreciated.
Thanks,
Brad Gibson
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: How to use auto range without invisible series?
Hello Brad,
In the AbstractRenderer class, there is this method added in version 1.0.13:
public void setDataBoundsIncludesVisibleSeriesOnly(boolean visibleOnly)
Sets the flag that controls whether or not the data bounds reported by this renderer will exclude non-visible series and sends a RendererChangeEvent to all registered listeners.
Parameters:
visibleOnly - include only visible series.
Since:
1.0.13
It should do what you are looking for.
In the AbstractRenderer class, there is this method added in version 1.0.13:
public void setDataBoundsIncludesVisibleSeriesOnly(boolean visibleOnly)
Sets the flag that controls whether or not the data bounds reported by this renderer will exclude non-visible series and sends a RendererChangeEvent to all registered listeners.
Parameters:
visibleOnly - include only visible series.
Since:
1.0.13
It should do what you are looking for.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: How to use auto range without invisible series?
David,
It appears XYBarRenderer ignores that flag. It overrides findRageBounds(). Is this an oversight or intentional? Thanks,
It appears XYBarRenderer ignores that flag. It overrides findRageBounds(). Is this an oversight or intentional? Thanks,
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: How to use auto range without invisible series?
It looks like an oversight, but I'll need to do a little bit of testing to be sure. It looks to me as if the XYBarRenderer.findRangeBounds(boolean) method should just call AbstractXYItemRenderer.findRangeBounds(XYDataset dataset, boolean includeInterval).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: How to use auto range without invisible series?
I made this change which will be included in the eventual 1.0.15 release:
http://jfreechart.svn.sourceforge.net/v ... 52&r2=2468
http://jfreechart.svn.sourceforge.net/v ... 52&r2=2468
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: How to use auto range without invisible series?
Wow, that was quick. Thank you.