thanatonaute Posted August 9, 2010 Share Posted August 9, 2010 Hi, I have a customizer which works well, I already use it to remove axis and other things when the chart has no data (I have to display pages even if the datasets I use to fill charts return no data).Now I want to swith the chart mode from opaque to transparent to reveal a text "NO DATA" beneath.the code I use is " jasperChart.setMode(ModeEnum.TRANSPARENT);" I print the ligne after "System.out.println(jasperChart.getModeValue());" for debug.I always get "OPAQUE" in logs and yet the chart is still opaque ;).Any idea ?thanks :) Link to comment Share on other sites More sharing options...
thanatonaute Posted August 25, 2010 Author Share Posted August 25, 2010 I figured out how to print a message on graphs when there is no data :using the plot function "setNoDataMessage" ;)Code:CategoryPlot plot = (CategoryPlot) chart.getPlot(); plot.setNoDataMessageFont(new Font("SansSerif", Font.BOLD,20));plot.setNoDataMessagePaint(Color.RED);plot.setNoDataMessage("Il n'y a pas de résultats correspondant à votre requête"); 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