Solved

How do I change force the Y axis Maximum in a Visual Studio Chart

Posted on 2016-11-16
5
63 Views
Last Modified: 2016-11-23
I am plotting data a line on a chart.  I want the Y axis range to stay the same.  The code is below data is changing and so the chart is constantly updating.    How can I fix the Y axis range?

    Chart1.Series.Clear()
    Chart1.Series.Add("Plot")
    Chart1.Series("Plot").ChartType = DataVisualization.Charting.SeriesChartType.FastLine
     For i = 0 To 200
                       Chart1.Series("Plot").Points.AddXY(i, theData.GetValue(i))
     Next (i)
0
Comment
Question by:Tom_Hickerson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41890973
try add something like this?
Chart1.ChartAreas(0).AxisY.Maximum = 200
        Chart1.ChartAreas(0).AxisY.Minimum = 10

Open in new window

0
 
LVL 1

Author Closing Comment

by:Tom_Hickerson
ID: 41895926
That worked thanks.  I was playing with the chart areas, but never found that one.  How do you find these values to change?  Is there a help file or website?
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 41898480
well, I think the best resources would be MSDN?

Chart Class
https://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.chart(v=vs.110).aspx

try to browse through the left hand side sub links.

for more examples you may do an Internet search instead. hope that helps
0
 
LVL 1

Author Comment

by:Tom_Hickerson
ID: 41899665
I saw that, but I don't see any reference to the specific axisy.minimum.
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 41900011
got to know the knowledge base is quite huge in MSDN.

first, on the left hand side sub links, i go click the ChartArea class then click ChartArea Properties
after that, i click on AxisY property


which lead you to:

Axis Class
https://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.axis(v=vs.110).aspx

Finally look for the Minimum property there.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question