Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-11

[Fwd: Re: TAChart: simple patch and a code cleanup question]

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author
Show quoted text 11 lines
> - I'm not sure if more TSeriesPointerStyles will follow from you, but I > could imagine adding a box and whisker plot style point and an errorbar > style (other variations on the theme as well) would be possible in the > future. So what do you say about implementing a polymorphic TPointStyle > class? Good idea. However, what about backwards compatibility? I personally do not need it, since I have just started switching my project to Lazarus, and can easily adjust code, but what about the others? Is it ok to simply drop TSeriesPointerStyles?

Why would you want to drop TSeriesPointerStyles? I would keep it so the user still can specify the point style either at runtime or in the OI. Depending on the choise the right TCustomPointStyle descendant will be created. Or did you have another idea?

Darius

Reply by email

Alexander Klenin
to Unknown author
Why would you want to drop TSeriesPointerStyles?

Just to get simpler and more consistent interface.

I would keep it so the user still can specify the point style either at runtime or in the OI.

This is an important point I did not consider. Indeed, this probably means that TSeriesPointerStyles should stay not only for backwards compatibility, but also for easier usage.

Depending on the choise the right TCustomPointStyle descendant will be created. Or did you have another idea?

Well, one obvious choice is to add OnDrawPoint event. It is less 'object-oriented', but simpler to use. What do you think?

Alexander S. Klenin Insight Experts Ltd.

Reply by email

Darius Blaszyk
to Alexander Klenin
Alexander Klenin wrote
Well, one obvious choice is to add OnDrawPoint event. It is less 'object-oriented', but simpler to use. What do you think?

Hmm, I don't see how that would improve readability. Imho it would just be moving code about in the same class. Making a polymorphic class would modularize the cart component a bit more.
It would make it more easy for instance to add mixed charts like line-bar or bar and error bar.

Darius

Reply by email