delphi - Mouseover hint for TChart series value -


I am using a TChart in Delphi 7, and I want to display charts sometime. I am using the following code to set the chain value to a database query:

  chart1.FreeAllSeries; Chart1.SeriesList.Clear; Chart1.AddSeries (TBarSeries.Create (self)); TBarSeries (chart1.Series [0]) BarStyle :. = BsRectGradient; Stop starting with Query 1; Executed; While EOF does not start chart1.Series [0]. Add (field 'flags' ('sum_actual_days'), Field Astrstring ('contract_no')); the upcoming; End; End;  

Each time (value) is now showing both the label below the bar and in a yellow rectangle above the bar.

Rather than repeating the amount of label twice, I have some additional information from the query that I would like to show above the bar rather than the label (or, preferably, as a mouseover signal). Can it be done with TChart? And how ...?

This can be done with a TChart using the onMouseMeave event of the chart. Something like this should start with you:

  Process TForm1.Chart1MouseMove (sender: tubet; shift: techfstat; x, y: integer); Vari Series Index: Integer; Start Series: Index: = Series 1. Pinch (X, Y); Chart 1 Shohint: = Series Index and LT & gt-1; If Chart 1 The showinette then starts query1. ResNo: = SeriesIndex; {This Series Index + 1 chart should be 1. Hint: = query1. FieldByName ('YourFieldNameHere'). AsString; End; End;  

Of course, the query that you used to populate the chart should still open this code to work.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -