[Lazarus] TAChart question
José Mejuto
joshyfun at gmail.com
Sat Oct 2 13:52:11 CEST 2010
Hello Lazarus-List,
Saturday, October 2, 2010, 5:34:56 AM, you wrote:
>> How can I create this with TAChart ? It only allows me numerical
>> values in both coordinates, or I was unable to find how to indicate
>> that X axis is "autoincrement".
AK> You should set BottomAxis.Marks.Source property to an appropriate
AK> chart data source.
AK> See demo/axis for an example.
I had already pointed it, but the axis demo is not what I want because
in axis demo the data is:
DataPoints.Strings = (
'1|18000|?|January'
'2|35000|?|February'
'3|31000|?|March'
'4|26000|?|April'
'5|37000|?|May'
'6|22000|?|June'
And I can only generate something like:
DataPoints.Strings = (
'January|18000|?|January'
'February|35000|?|February'
'March|31000|?|March'
'April|26000|?|April'
'May|37000|?|May'
'June|22000|?|June'
This means I do not have a "record index" value and to generate it I
must create a temporal "memds" or alike and populate it manually which
seems to be a not very usefull way.
I think I can easily patch TAChart for my needs using in TADbSource:
------------
if FieldX <> '' then
FCurItem.X := ds.FieldByName(FieldX).AsFloat
else
FCurItem.X := ds.recno;
------------
But I do not like to modify standard components. Thank you.
--
Best regards,
José
More information about the Lazarus
mailing list