How do I programmatically change the size of points on a point chart ?

Hi,
I am programmatically adding points to a point series of a TChart. I want to be able to change the size of the points at run time so that if I zoom in too much I can still see them. It seems it is the density of points that makes them easy to see with the chart zoomed out. When I zoom in so much that only a few points are showing, they become impossible to see. They are a good size to see well until I zoom in too much. I was thinking of adding a spin button to allow manual resizing of the points when necessary. I think, but am not sure, that what I need to change is the width and height under "Small Dot" in the format tab of chart1.series1. I don't know how to do it programmatically. Something like TChart1.Series1.Format.width :=    ?
ChLaProducerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ThommyCommented:
Try calling TChart.Draw() in your chart's OnZoom and OnUndoZoom event...

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  Chart1.Draw();
end;

procedure TForm1.Chart1UndoZoom(Sender: TObject);
begin
  Chart1.Draw();
end;

Open in new window

ChLaProducerAuthor Commented:
This doesn't seem to help. When zoomed in the grid is easier to see than my plotted points.
ChLaProducerAuthor Commented:
In this first picture you see a typical plot on the chart. This is the small version of the chart, with no zoom. You can see the plot is easy to see.
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

ChLaProducerAuthor Commented:
In this second picture you see the small chart. Here I have zoomed in quite a bit and the plot is still easy to see.
ChartSmZm.jpg
ChLaProducerAuthor Commented:
Here is that first picture.
ChartSmUnzm.jpg
ChLaProducerAuthor Commented:
In this third picture we are still looking at the small chart. Here we have zoomed in quite a bit and now the plot is harder to see than the grid.
ChartSmZmmm.jpg
ChLaProducerAuthor Commented:
In this fourth picture you see the large chart. I have a page control. To see the large chart I switch tabs (right click on the chart) to a larger free area where I move and resize the chart. Here I have already zoomed in as much as the second image and already it is a bit hard to see the plotted points.
ChartLgZm.jpg
ChLaProducerAuthor Commented:
In this fifth and last image we are looking at the larger chart. We have zoomed in as much as in the third picture. You can see it is very difficult to see the plotted points. When I tried adding Chart1.Draw(); to the two events, it didn't effect the visibility of these plotted points.
ChartLgZmmm.jpg
ChLaProducerAuthor Commented:
Okay, I lied, sorry...One more picture...
This image shows my current series settings for the chart.
SeriesSettings.jpg
ChLaProducerAuthor Commented:
I have done some experimenting. I found that the horizontal and vertical sizes do not affect the size of Small Dots. It does change the size of circles. But while the small dots are colored individually, all circles appear in the same color, black. So what I am thinking is I need to be able to programmatically change from small dots to circles, and then back again.
I have been using AddXY like this: Chart1.Series[0].AddXY(X, Y, ' ', clBlue); so I can have the dots colored. Why don't the circles color ? How do I programmatically change from small dots to circles ?
If I change from small dots to circles after the chart is drawn, will the dots change to circles, or will I need to redraw the chart ?
ChLaProducerAuthor Commented:
Never mind. I eventually found the answers myself. The circles did not appear to be colored because of a black border. Many closely spaced circles will appear black because of the border. I fixed this by making The border invisible. To change from small dots to circles: Series1.Pointer.Style:= paCircle; Of course Series1.Pointer.Style := SmallDot; changes it back. To change the size of circles: Series1.Pointer.Size := CircleSize; CircleSize is an integer.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ChLaProducerAuthor Commented:
I only received one comment to my question and it didn't work. I eventually discovered the answers myself.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.