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

Overriding DefaultChartTheme: safe or not?


andrey_nado

Recommended Posts

Hi, JasperReports team! Thanks for great library.

I need my custom chart theme, but my only goal is to create special pie charts. Other functionality should be pretty standard.

I decided to extend standard class net.sf.jasperreports.engine.fill.DefaultChartTheme and override createPie3DChart and createPieChart methods. They both are protected, thanks!

My question: are these two methods the part of contract of DefaultChartTheme class? Will this class be dramatically changed in the future versions of JasperReports and createPie3DChart and createPieChart methods disappear or change their signatures? Is my approach safe and correct enough?

Regards,

Andrey

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

While there's no firm guarantee that the method signatures won't change, that probably will not happen and we'll take into consideration such customizations.

The problem I see here is that you had to copy (and modify) entire methods from DefaultChartTheme, and if we change something in the methods your theme will not see the change.  Ideally we should provide finer grained extension points.

Regards,

Lucian

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...