Jump to content
We've recently updated our Privacy Statement, available here ×

Dynamic mode (OPAQUE/TRANSPARENT) in customizer


thanatonaute

Recommended Posts

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

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...