[Lazarus] TAChart 2nd Y Axis

Alexander Klenin klenin at gmail.com
Fri Jul 29 12:06:08 CEST 2011


On Fri, Jul 29, 2011 at 18:42, David M. Lawrence <dave at fuzzo.com> wrote:
> The linear transform worked -- I finally figured out how to implement it.
> The chart is almost where it should be, except for the X-axis labels.  I
> need to dynamically define which of two options to use:
>
> J F M A M J J A S O N D (MnthNHLabels) for northern hemisphere sites, and
> J A S O N D J F M A M J (MnthSHLabels) for southern hemisphere sites.
>
> The compiler seemed to have no problem with my code:
>
>  if lat < 0 then ClimateDataChart.BottomAxis.Marks.Source := MnthSHLabels
>    else ClimateDataChart.BottomAxis.Marks.Source := MnthNHLabels;
>
> The data source options I have tried, however (TListChartSource and
> TUserDefinedChartSource) seem determined to convert the strings to numbers
> -- primarily 0.  What kind of chart source would allow me to use the strings
> above instead?  Or is there something else I would need to do?
>

Assuming the source correctly fills Text field of the data items,
you only need to set Marks.Style property to smsLabel.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list