Sign in Join

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

Mailing lists / lazarus / 2015-05

Lazarus TChart Component

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Terry A. Haimann

I am having trouble with the TChart Component. When it first comes up it has on the left axis numeric ticks showing the range of the values (see image Pict1.)

And then during the app after I change the record, the numeric tick values go away (see pict2.)

As much as I try, I haven't been able to pro grammatically redisplay the numeric tick marks.

I am sure there is some simple instructions to get them to redisplay, but I haven't figured it out. For the record this is Lazarus 1.2.4, FPC 2.6.4 and it is running on Linux Mint Mate 17-64 on an Intel i5.

At the begining of the procedure I issue a:
	MyChartLineSeries1.Clear;
And then in the inner loopp I am just doing:
	MyChartLineSeries1.Add(Sum,Copy(CmpDate,6,10),clRed);

Thanks for your assistance,

Terry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pict1.jpg
Type: image/jpeg
Size: 73893 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150503/bf8e62c5/attachment-0002.jpg> -------------- next part --------------
A non-text attachment was scrubbed...
Name: Pict2.jpg
Type: image/jpeg
Size: 66483 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150503/bf8e62c5/attachment-0003.jpg>

Reply by email

Terry A. Haimann
to Terry A. Haimann: I am having trouble with the TChart Component. When it first comes up it has on the left…

Lets come at it from a slightly different angle. After issuing a MyChartLineSeries1.Clear, What variables on the MyChart.LeftAxis need to be set programatically to display the numeric reference numbers on the left hand side. Such is as in Pict1.

Terry A. Haimann wrote 30 lines
I am having trouble with the TChart Component. When it first comes up it has on the left axis numeric ticks showing the range of the values (see image Pict1.) And then during the app after I change the record, the numeric tick values go away (see pict2.) As much as I try, I haven't been able to pro grammatically redisplay the numeric tick marks. I am sure there is some simple instructions to get them to redisplay, but I haven't figured it out. For the record this is Lazarus 1.2.4, FPC 2.6.4 and it is running on Linux Mint Mate 17-64 on an Intel i5. At the begining of the procedure I issue a: MyChartLineSeries1.Clear; And then in the inner loopp I am just doing: MyChartLineSeries1.Add(Sum,Copy(CmpDate,6,10),clRed); Thanks for your assistance, Terry -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Werner Pamler
to Terry A. Haimann
After issuing a MyChartLineSeries1.Clear, What variables on the MyChart.LeftAxis need to be set programatically to display the numeric reference numbers on the left hand side. Such is as in Pict1.

You can use the chart's Extent properties to force the labels to be in a given range (Chart1.Extent.YMax := 16.1, Chart1.Extent.YMin := 15.6; Chart1.UseXMax := true; Chart1.UseXMin := true). But then these labels won't update automatically after you, for example, added new data which outside this range. Therefore, I think that this is not the correct solution.

You somehow must have misconfigured the axis, because normally an axis shows labels even if the chart is empty. It is hard to tell from the distance what you did wrong. Can you pack the chart part of your program into a little compilable demo which shows the issue and which you can add as an attachment?

Reply by email