Thursday 15 July 2010

delphi - TChart find valueindex with mousemove over bottom axis label -


Delphi 7 and Teacht version 2014 Daleefii 7

I have 16 times the series and a 3 with 16 values DTechart is (A 16x16 3D bar chart)

When I move the mouse over the pivot at the bottom, then I should know the value index of the series that the mouse is over.

I want to hide (transparency = 75) All other values ​​therefore bars are displayed only for this index. (For all the displayed series, only that index is shown in effect in a 1x16 chart)

How can I get the mouse index?

series' clicked (x, y) function returns -1 if series (x, y ) If the position (in pixels) is under the position (in pixels), if the position of the series (x, y) is under (in pixels), then it gives the indicator of the point under the series.

Here's a simple example using the on-the-mousemove event:

 uses the  series; Process TForm1.FormCreate (Sender: TObject); Var i: integer; Start chart 1. Visual 3D: = Wrong; I: Chart 1 = 0 to 2. AdSeries (TBRseries) .FilS sample liabilities (3); End; Process TForm1.Chart1MouseMove (Sender: Tubect; ​​Shift: TichFestState; X, Y: Integer); Var series index, value index: integer; Start captions: = 'No series below the mouse'; For serial indices: chart = 1 Begin down value from chain 1 to index 0 index: = chart 1 [series index]. Pasted (X, Y); If valueIndex & gt; -1 then caption: = 'Series below the mouse. Series Index: '+ IntToStr (Series Index) +', Value Indices: '+ Intetstrack (Value Indexes); End; End;  

No comments:

Post a Comment