marc_nikko Posted November 19, 2009 Share Posted November 19, 2009 Hi,I created a multi axis chart with two time series charts. By default it works well. I wanted to display each time series chart depending on a parameter. To test this, I added a new Boolean(false) to the Print When Expression field to one of the time series charts. However, that time series chart still appears.Do you guys know how I can accomplish this task?Thanks,MarcPost Edited by marc_nikko at 11/19/2009 17:11Post Edited by marc_nikko at 11/19/2009 17:11 Link to comment Share on other sites More sharing options...
marc_nikko Posted November 19, 2009 Author Share Posted November 19, 2009 I have a workaround which requires a customizer setting the dataset of the plot to null. If you find a better way please advise. The code snippet is shown below. Code: public void customize(JFreeChart chart, JRChart jasperChart) { try { XYPlot plot = (XYPlot) chart.getPlot(); .... plot.setDataset(2,null); } catch (Exception e) { System.out.println("Error in customize " + e); } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now