Recent

Author Topic: data structures in TAChart  (Read 3418 times)

greatUnknown

  • New Member
  • *
  • Posts: 19
data structures in TAChart
« on: September 04, 2012, 05:08:34 pm »
a) In [TARadialSeries] TPolarSeries there is a published property Source, with no read or write access.
    Why not use the property in the ancestor class [TACustomSeries] TChartSeries by publishing
    the existing property Source with the read and write methods?

b) In [TACustomSource] TCustomChartSource there is a property Count with a read method which
    is virtual abstract.  Why not add a write method procedure setCount (ACount: Integer); virtual; abstract;
    which would allow changing the count as necessary

c) In [TASources] TUserDefinedChartSource there is a field FPointsNumber accessible through the property
    PointsNumber with read and write methods.  Why use this term instead of the Count term
    used in other sources and just inherit the Count from the ancestor classes?

d) I suspect this is all to protect Count from write access.  If so, why?

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: data structures in TAChart
« Reply #1 on: September 04, 2012, 07:25:13 pm »
Quote
TPolarSeries there is a published property Source, with no read or write access.
    Why not use the property in the ancestor class [TACustomSeries] TChartSeries by publishing    the existing property Source with the read and write methods?
The code does exactly that. Why do you think otherwise?

Quote
protect Count from write access.  If so, why?
Basically, there are two strategies here -- implement SetCount and
have it throw exception for the sources which do not allow changing number of points,
or not implement SetCount and use other mechanism for those that do.
Currently, changing number of points is supported by 2 out of 8 sources,
so it is more economical to use first strategy.
The difference is not large, so it is also a kind of historical accident.

By the way, did the animated source help you?
I have partially implemented it hoping for you feedback to continue.

greatUnknown

  • New Member
  • *
  • Posts: 19
Re: data structures in TAChart
« Reply #2 on: September 04, 2012, 09:04:07 pm »
Quote
The code does exactly that. Why do you think otherwise?
Because when I tried to access Source in TPolarSeries, I had compiler problems.  I'll have to check again.

Quote
By the way, did the animated source help you?
I have partially implemented it hoping for you feedback to continue.

Haven't had time to check it yet, but I looked at the demo quickly and it looks like what I need.
I still have to absorb event-driven programming a bit more.

I've been working on simpler display issues such as squaring the aspect of the graph display by
manipulating extent.  For polar graphs, you can see why this is important. [attachments]

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: data structures in TAChart
« Reply #3 on: September 04, 2012, 09:44:03 pm »
Quote
squaring the aspect of the graph display by
manipulating extent

Try setting Chart.Proportional = true

greatUnknown

  • New Member
  • *
  • Posts: 19
Re: data structures in TAChart
« Reply #4 on: September 04, 2012, 09:49:07 pm »
So many options, so sparse documentation...

wp

  • Hero Member
  • *****
  • Posts: 7970
Re: data structures in TAChart
« Reply #5 on: September 04, 2012, 11:09:23 pm »
TAChart is a very flexible component, it cannot be expected to control everything with a handful of settings. 

Documentation could be better, I agree, but the complete docs will be a thick book which nobody is reading...

Anyway, there is some progress: Do you know these?

Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

greatUnknown

  • New Member
  • *
  • Posts: 19
Re: data structures in TAChart
« Reply #6 on: September 04, 2012, 11:40:03 pm »
I've seen all of those, as well as going through most of the demos, but ASK, you, and
others seem to be pumping out improvements faster than anyone can document them. 
Not that I'm complaining...

But it would be nice to have a reference of the various types and options without
printing out - and analyzing - about fifty ta* units.  Just a list, with the public
elements and a few words about what they do.

Maybe a project for my "spare time", but I don't know the system and its interactions
at all.


Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: data structures in TAChart
« Reply #7 on: September 05, 2012, 04:16:58 am »
Quote
reference of the various types and options
http://wiki.lazarus.freepascal.org/TAChart_documentation is intended to be such reference. It is little less terse than a simple list, but still aims to be short yet comprehensive.

It is, of course, not prefect -- thank you for noticing another omission.
I have now documented Chart.Proportional property.

 

TinyPortal © 2005-2018