Hi.
When drawing points on a line graph, is it possible, via code, to make the points round and without a black boarder?
Could someone give me any code examples please?
Thanks
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150603/53490f86/attachment.html>
Mailing lists / lazarus / 2015-06
TAChart
9 messages · 3 people · –
- RRichard Mace 4
- WWerner Pamler 4
- SSalvatore Coppola 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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 borderWerner Pamler wrote 7 lines
?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 compileRichard
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150603/e726f038/attachment.html>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/fa2d784e/attachment-0001.html>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/f3ebc36c/attachment.html>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/1f0ee94c/attachment.html>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150604/58bffd41/attachment.html>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150605/31192ca3/attachment.html>
Thanks, that worked a treat.
Richard
Salvatore Coppola wrote 31 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150606/667105b1/attachment.html>
