How to Set the Value of Axis

Dec 29, 2008 at 2:46 AM
I would like to set the value of the verticalAxis,such as MaxValue or MinValue.
The Axis is so sensitive,  for example, the number between 2.1 and 2.2, if only two number on the Plotter, there'll be a big fall.
how can I set the verticalAxis...? can I?
Editor
Dec 29, 2008 at 7:45 AM
Edited Dec 29, 2008 at 7:51 AM
Hi!

Sorry, but I think I didn't really get an idea of your request.
Do you want to set an array of ticks on axis manually?

What do you mean, asking "how can I set the verticalAxis...?"? You can change axis, using properties HorizontalAxis and VerticalAxis of ChartPlotter.
Dec 31, 2008 at 9:40 PM
Somewhat related to this... I would like to set my horizontal axis so that only whole numbers are used.  Fractional double values don't really make sense for the data I'm charting.  But I don't want to have to calculate the tick values manually.  I want the control to do it but also to use just whole numbers for the major ticks.  Can this be done?
Editor
Jan 1, 2009 at 10:12 AM
Hi!

I got the idea, but if you'll draw a picture that shows ticks' behavior you need, it will be even better.
Also you can describe a little pecularities of data and model you are visualizing, maybe in picture, too. This will help us to understand your problem better and probably to give you some suggestions.
And please describe how whole ticks should behave while panning and zooming charts.
Jan 1, 2009 at 5:38 PM
I want the same behavior that exists in the Stock Exchange sample that is distributed with the code. Notice that all the major ticks are whole year values. That's exactly the behavior that I want but for regular numbers rather than years.


From: [email removed]
To: [email removed]
Date: Thu, 1 Jan 2009 02:12:32 -0800
Subject: Re: How to Set the Value of Axis [dynamicdatadisplay:43101]

From: thecentury
Hi!

I got the idea, but if you'll draw a picture that shows ticks' behavior you need, it will be even better.
Also you can describe a little pecularities of data and model you are visualizing, maybe in picture, too. This will help us to understand your problem better and probably to give you some suggestions.
And please describe how whole ticks should behave while panning and zooming charts.
Read the full discussion online.
To add a post to this discussion, reply to this email (dynamicdatadisplay@discussions.codeplex.com)
To start a new discussion for this project, email dynamicdatadisplay@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Editor
Jan 4, 2009 at 2:43 PM
Hi, psyphyre!

I'm not sure you want certainly this, but in the latest version of DynamicDataDisplay v0.2.1 it is possible to specify minimal step between ticks on numeric axis. This can be done by such code:
            ((NumericTicksProvider)((NumericAxis)plotter.HorizontalAxis).TicksProvider).MinStep = 1;
Is this what you've wanted?


Jan 5, 2009 at 1:30 AM
Edited Jan 5, 2009 at 1:31 AM
Hi!

Sorry, but I think I didn't really get an idea of your request.
Do you want to set an array of ticks on axis manually?

What do you mean, asking "how can I set the verticalAxis...?"? You can change axis, using properties HorizontalAxis and VerticalAxis of ChartPlotter.

----------------------------------------------------------------------------------------------------------

sorry.
  I mean "How can I set the Maxvalue of the VerticalAxis of ChartPlotter". The Axis of ChartPlotter is Auto Fit To View.
if  the number between 0 and 100 on the ChartPlotter , the Maxvalue of the VerticalAxis  would be 100, but I want it to be 150 or 200 or ....  Otherwise ,if I don't care about the number below 50, can I change the MinValue of  the VerticalAxis to 50 ?
Editor
Jan 5, 2009 at 7:50 AM
Edited Jan 5, 2009 at 7:51 AM
Hi!

Both horizontal and vertical axes are taking their values from one place - this is ChartPlotter.Viewport.Visible property. Visible is a rectangle; by setting new visible rect to Viewport you can control displayed area.
AutoFitToView can be switched off by setting Viewport's property AutoFitToView to false.

Best regards,
Mikhail Brinchuk, DynamicDataDisplay Dev Team.
Jan 5, 2009 at 8:59 PM
Yep, the MinStep property pretty much gives me what I wanted.  The major ticks now show up in whole number increments.  But now is it possible for me to remove the minor ticks from appearing on the axis? 
Jan 6, 2009 at 1:10 AM
Hi!

Both horizontal and vertical axes are taking their values from one place - this is ChartPlotter.Viewport.Visible property. Visible is a rectangle; by setting new visible rect to Viewport you can control displayed area.
AutoFitToView can be switched off by setting Viewport's property AutoFitToView to false.

Best regards,
Mikhail Brinchuk, DynamicDataDisplay Dev Team. 

 Hi!
   Thanks! That works.  
Best regards
  someone.
Editor
Jan 9, 2009 at 3:52 PM
Hi, psyphyre!

You can hide minor ticks from Axis, setting false to Axis's DrawMinorTicks property.
May 30, 2012 at 2:28 PM

Hi!

 

I want to change the axis's major ticks. Currently the range is 0 to 60 and I want it like 0-5-10.......60 on numeric axis.

How can I do this? 

Thanks.