0
正如標題所說,我正在使用TeeChart在一個圖表對象內繪製幾個箱形圖。因爲箱型圖的數量可能相當大,所以我希望能夠點擊一個盒子並將與該系列有關的信息顯示爲工具提示。如何將工具提示添加到TeeChart的Box圖中?
我目前正在試圖用MarksTip做這件事,但由於某種原因,當我試圖將鼠標懸停在盒子上時,MarksTip有時會打開,然後立即關閉(基本上可見一秒鐘)。我已經嘗試設置隱藏延遲,但它似乎忽略了這一點。
下面的代碼片段:
seriesIndex = 0;
foreach (var seriesData in seriesDataList)
{
var series = new Box()
series.UseCustomValues = true;
series.Box.HorizSize = 5;
series.Box.Style = PointerStyles.Rectangle;
series.MildOut.Visible = true;
series.MildOut.HorizSize = 2;
series.MildOut.VertSize = 2;
series.ExtrOut.Visible = true;
series.ExtrOut.HorizSize = 2;
series.ExtrOut.VertSize = 2;
series.LinePen.Visible = _isLineVisible;
series.Pointer.Pen.Visible = true;
series.ShowInLegend = false;
series.Add(seriesIndex, seriesData);
series.Title = "tooltip text";
var tooltip = new MarksTip(Chart.Chart)
{
Series = series,
Style = MarksStyles.SeriesTitle,
HideDelay = 31000,
};
Chart.Series.Add(series);
seriesIndex++;
}