Axis value adjust limit

Status
Not open for further replies.

bones

Well-known member
Joined
Aug 23, 2014
Messages
143
Programming Experience
Beginner
I have another question about charting if you have a minute to answer it.

I set my chart options for each series in the code. Is there a way to establish the Y Axis value so that it adjusts to beginning at say.....a value of 5 below the lowest value being charted on the Y Axis and sets the upper limit to a value of 5 above the highest charted value?

Here is the section of code I believe I would perform that in but I do not know what to write there...

VB.NET:
 With Me.Chart1.ChartAreas(0)
                Chart1.DataSource = SourceTable
                .AxisX.Interval = 0.1
                .AxisY.Interval = 15
 
I set my chart options for each series in the code. Is there a way to establish the Y Axis value so that it adjusts to beginning at say.....a value of 5 below the lowest value being charted on the Y Axis and sets the upper limit to a value of 5 above the highest charted value?
Axis class has a Minimum/Maximum properties that can be set, ie for AxisX/AxisY instances. If you need less control over min/max you can instead set IsStartedFromZero property to False. Axis Class (System.Windows.Forms.DataVisualization.Charting)
 
Status
Not open for further replies.
Back
Top