Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys.
I'm relatively new to programming and have run into a problem. I'm creating a form with a chart control, the style is range bar. I'm getting the data from an existing listview in another form. I'vfe accomplishes getting the data via an array and a for each loop.
My problemn is the height of the chart control. I have like 100-200 points on the x-axis. if I don't set the height of the chart, it keeps the basic height from the form designer and the chart is unreadable. I've now tried to adjust like the example seen below.
aseries is the series I create and add the points to.
This DOES make the are higher, but results in big gaps on top and on the bottom.
So, the question. Is there another way to set the height dynamically, or even set a fixed height for the points? Thanks in advance.

Michael

What I have tried:

VB
chartarea(0).Height = aSeries.Points.Count * 20
Posted
Updated 16-May-17 4:02am

You should go to the Property ChartAreas.
There you find under Scaling the Properties 'Maximum' and 'Minimum' for each Axis.
If you write Values in there the Chart works with it ...
 
Share this answer
 
I've fixed it by simply adding a scrollbar to the chartarea instead of the form. As I mentioned, total newbie. . .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900