Sign in Join

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

Mailing lists / lazarus / 2015-06

TAChart

9 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Werner Pamler
to Richard Mace

I suppose you use a TLineSeries, but the same principle should work for TBSplineSeries and TCubicSplineSeries

Chart1LineSeries1.Pointer.Style := psCircle;         // round points
Chart1LineSeries1.Pointer.Pen.Style := psClear;    // no border

Reply by email

Richard Mace
to Werner Pamler
Werner Pamler wrote 7 lines
I suppose you use a TLineSeries, but the same principle should work for TBSplineSeries and TCubicSplineSeries ?? Chart1LineSeries1.Pointer.Style := psCircle; // round points Chart1LineSeries1.Pointer.Pen.Style := psClear; // no border

?Thanks Werner.
That's interesting,
?
Chart1LineSeries1.Pointer.Style := psCircle;
Doesn't compile, but I can navigate to it at design time?

  chartMain.ClearSeries;
  FLine := TLineSeries.Create(chartMain);
  FLine.Marks.Style := TSeriesMarksStyle(4);
  FLine.Marks.OverlapPolicy := opHideNeighbour;
  FLine.ShowLines := true;
  FLine.ShowPoints := true;
  FLine.Pointer.Brush.Color := clBlue;
  FLine.Pointer.Style := psCircle; <---- this line won't compile

Richard

?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150603/e726f038/attachment.html>

Reply by email

Werner Pamler
to Richard Mace

Oh - the old "uses" issue... "psCircle" is declared in unit TATypes which is not added to "uses" designtime, just use the ObjectInspector: The tree above the Object Inspector shows the chart and the series as a child of the chart. Click on the series to brings the series properties into the Object Inspector. Scroll down a bit to see the "Pointer" property, open the node and find the "Style".

Maybe you are interested also in my forum posting of today containing a lot of TAChart runtime code:
http://forum.lazarus.freepascal.org/index.php/topic,28628.msg179298.html#msg179298

Richard Mace wrote 39 lines
On 3 June 2015 at 17:49, Werner Pamler < <mailto:>> wrote: I suppose you use a TLineSeries, but the same principle should work for TBSplineSeries and TCubicSplineSeries ? ? Chart1LineSeries1.Pointer.Style := psCircle; // round points Chart1LineSeries1.Pointer.Pen.Style := psClear; // no border ? Thanks Werner. That's interesting, ? Chart1LineSeries1.Pointer.Style := psCircle; Doesn't compile, but I can navigate to it at design time? chartMain.ClearSeries; FLine := TLineSeries.Create(chartMain); FLine.Marks.Style := TSeriesMarksStyle(4); FLine.Marks.OverlapPolicy := opHideNeighbour; FLine.ShowLines := true; FLine.ShowPoints := true; FLine.Pointer.Brush.Color := clBlue; FLine.Pointer.Style := psCircle; <---- this line won't compile Richard ? -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/fa2d784e/attachment-0001.html>

Reply by email

Werner Pamler
to Richard Mace

The rectangle enclosing the shown data range is called the LogicalExtent of the Chart. Therefore, store the LogicalExtent before performing a zoom in a TDoubleRect (savedExtent := Chart.LogicalExtent), and to go back you just assign it the other way: Chart.LogicalExtent := savedExtent. (The unzoomed extent already is available as "Chart.GetFullExtent").

All this is managed by the TChartExtentHistory. Details are explained in the Mandelbrot-Tutorial
(http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_ColorMapSeries,_Zooming#Zoom_history).

Richard Mace wrote 14 lines
Hi, Another quick question. How can you, via code, zoom out of a chart, effectively back to what it was by default? If that makes sense? Thanks Richard -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/1f0ee94c/attachment.html>

Reply by email

Werner Pamler
to Richard Mace: Another quick question. How can you, via code, zoom out of a chart, effectively back to…

And I forgot to mention that you can unzoom in the standard configuration by just clicking into the chart

Richard Mace wrote 14 lines
Hi, Another quick question. How can you, via code, zoom out of a chart, effectively back to what it was by default? If that makes sense? Thanks Richard -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/58bffd41/attachment.html>

Reply by email

Salvatore Coppola
to Richard Mace: Another quick question. How can you, via code, zoom out of a chart, effectively back to…

Maybe

TChart.ZoomFull

can help you

2015-06-04 21:35 GMT+02:00 Richard Mace :

Show quoted text 15 lines
Hi, Another quick question. How can you, via code, zoom out of a chart, effectively back to what it was by default? If that makes sense? Thanks Richard -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150605/31192ca3/attachment.html>

Reply by email

Richard Mace
to Salvatore Coppola

Thanks, that worked a treat.

Richard

Salvatore Coppola wrote 31 lines
Maybe TChart.ZoomFull can help you 2015-06-04 21:35 GMT+02:00 Richard Mace : > Hi, > Another quick question. How can you, via code, zoom out of a chart, > effectively back to what it was by default? If that makes sense? > > Thanks > > Richard > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150606/667105b1/attachment.html>

Reply by email