Sign in to follow this  
johncblandii

Modularizing Duplicate Code

Recommended Posts

I'm making numerous tweaks to the charts and I have the MSArea2DChart doing what we need but now we need the MSLine2DChart to do it too. I'm going over code and things like drawing labels, vdivlines, etc looks to be line for line exact.

So, my request is to better modularize common functionality into utility classes or just put them in a common parent class. This way if people buy the source, like we did, someone poor soul, like me, doesn't have to make changes to every chart source file to fix the staggering logic. :-(

Thanks.

Share this post


Link to post
Share on other sites

Hi John,

 

 

 

For each chart, the common functionality has been grouped in hierarchical parent structure (Chart > SingleYAxisChart > ...). However, in many cases there are similar functionalities having minute differences, in which case we've to port them to individual classes.

Share this post


Link to post
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
Sign in to follow this