Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Get a value out off a chart just by a mouse click

Is it possible to get the value of the X-ax out of a chart just by clicking
in the chart? What i want is to zoom in on a given chart area by clicking on
the start and stop range. If i have the X-ax value's, (it's a time stamp), i
can select the new source for the "zoomed" chart.

Any ideas?

Grtz,
rody


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Get a value out off a chart just by a mouse click

Charts have events, including a MouseDown event, that could be used to trap a
mouse click and determine the location - as x and y values representing
distance from the upper left corner of the ChartArea (not to be confused with
any coordinates used in your chart). But to use this to find a specific and
accurate point using your chart coordinates would be quite difficult in
practice, I would think, since there are multiple (and variable) scaling
factors involved (what is the size and location of the PlotArea? Then what
type of chart is it? Where is the origin of the axes? What scale are you
using currently in the chart...). You would need to develop a custom class
to do all of this; seems to me it would be quite difficult!

"Rody" wrote:

Is it possible to get the value of the X-ax out of a chart just by clicking
in the chart? What i want is to zoom in on a given chart area by clicking on
the start and stop range. If i have the X-ax value's, (it's a time stamp), i
can select the new source for the "zoomed" chart.

Any ideas?

Grtz,
rody



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Get a value out off a chart just by a mouse click

Hi Rody,

Is it possible to get the value of the X-ax out of a chart just by clicking
in the chart? What i want is to zoom in on a given chart area by clicking on
the start and stop range. If i have the X-ax value's, (it's a time stamp), i
can select the new source for the "zoomed" chart.

Any ideas?


Sure. See Chapter 15 from PED, available for download on my web site, which
shows how to convert between mouse click coordinates to data coordinates.

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Right Mouse Click StephenD Excel Discussion (Misc queries) 4 May 27th 09 04:24 PM
right mouse click not working VSLAU1 Excel Discussion (Misc queries) 1 March 18th 08 03:55 AM
Each Click of the Mouse D.Parker Excel Discussion (Misc queries) 13 April 28th 05 11:24 PM
Mouse Over Graph, Capture Information on Click(Double Click) Dean Hinson[_3_] Excel Programming 1 December 6th 04 04:49 AM
Mouse Click Event Srinath Excel Programming 2 July 18th 03 04:03 AM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"