@@ -772,7 +772,7 @@ public void Show(float pointX, float pointY)
772
772
/// </summary>
773
773
public void Hide ( )
774
774
{
775
- if ( CartesianChart ? . BehaviorLayout . Children . Count > 0 )
775
+ if ( CartesianChart ? . _trackballView . Children . Count > 0 )
776
776
{
777
777
RemoveTrackballTemplateInfo ( CartesianChart ) ;
778
778
}
@@ -959,7 +959,7 @@ internal void DrawElements(ICanvas canvas, Rect dirtyRect)
959
959
960
960
foreach ( var item in _axisPointInfos )
961
961
{
962
- if ( ShowLabel && ! item . HasTrackballAxisTemplate )
962
+ if ( ! item . HasTrackballAxisTemplate )
963
963
{
964
964
item . Helper . Draw ( canvas ) ;
965
965
}
@@ -1097,9 +1097,9 @@ void UpdateTrackballPointInfos(float pointX, float pointY)
1097
1097
{
1098
1098
foreach ( var info in PreviousPointInfos )
1099
1099
{
1100
- if ( CartesianChart . BehaviorLayout . Contains ( info . ContentTemplateView ) )
1100
+ if ( info . ContentTemplateView != null && CartesianChart . _trackballView . Contains ( info . ContentTemplateView ) )
1101
1101
{
1102
- CartesianChart . BehaviorLayout . Remove ( info . ContentTemplateView ) ;
1102
+ CartesianChart . _trackballView . Remove ( info . ContentTemplateView ) ;
1103
1103
}
1104
1104
}
1105
1105
@@ -1110,9 +1110,9 @@ void UpdateTrackballPointInfos(float pointX, float pointY)
1110
1110
{
1111
1111
foreach ( var info in _previousAxisPointInfos )
1112
1112
{
1113
- if ( CartesianChart . BehaviorLayout . Contains ( info . AxisTemplateView ) )
1113
+ if ( CartesianChart . _trackballView . Contains ( info . AxisTemplateView ) && info . AxisTemplateView != null )
1114
1114
{
1115
- CartesianChart . BehaviorLayout . Remove ( info . AxisTemplateView ) ;
1115
+ CartesianChart . _trackballView . Remove ( info . AxisTemplateView ) ;
1116
1116
}
1117
1117
}
1118
1118
@@ -1252,7 +1252,7 @@ void GenerateAxisTrackballInfos(float leastX)
1252
1252
{
1253
1253
Duration = double . NaN
1254
1254
} ;
1255
- CartesianChart . BehaviorLayout . Add ( trackballTemp ) ;
1255
+ CartesianChart . _trackballView . Add ( trackballTemp ) ;
1256
1256
trackballTemp . Helper . CanNosePointTarget = true ;
1257
1257
trackballTemp . Background = TrackballBackground ;
1258
1258
ContentList . Add ( trackballTemp ) ;
@@ -1868,9 +1868,9 @@ void RemoveTrackballInfo(TrackballPointInfo pointInfo)
1868
1868
{
1869
1869
foreach ( var info in PreviousPointInfos )
1870
1870
{
1871
- if ( info . DataItem == pointInfo . DataItem && info . Series == pointInfo . Series )
1871
+ if ( info . DataItem == pointInfo . DataItem && info . Series == pointInfo . Series && info . ContentTemplateView != null )
1872
1872
{
1873
- CartesianChart ? . BehaviorLayout . Remove ( info . ContentTemplateView ) ;
1873
+ CartesianChart ? . _trackballView . Remove ( info . ContentTemplateView ) ;
1874
1874
PreviousPointInfos . Remove ( info ) ;
1875
1875
1876
1876
return ;
@@ -1940,21 +1940,21 @@ bool IsRectContainsPoints(TrackballPointInfo pointInfo)
1940
1940
1941
1941
SfTooltip ? GetOrCreateTrackballView ( SfCartesianChart chart , TrackballPointInfo ? prevTrackballInfo )
1942
1942
{
1943
- var trackballView = prevTrackballInfo ? . ContentTemplateView as SfTooltip ;
1943
+ var trackballTooltip = prevTrackballInfo ? . ContentTemplateView as SfTooltip ;
1944
1944
1945
- if ( trackballView == null && ShowLabel )
1945
+ if ( trackballTooltip == null && ShowLabel )
1946
1946
{
1947
- trackballView = new SfTooltip
1947
+ trackballTooltip = new SfTooltip
1948
1948
{
1949
1949
Background = _actualLabelStyle . Background
1950
1950
} ;
1951
- chart . BehaviorLayout . Add ( trackballView ) ;
1952
- trackballView . Duration = double . NaN ;
1953
- trackballView . Helper . CanNosePointTarget = true ;
1954
- ContentList . Add ( trackballView ) ;
1951
+ chart . _trackballView . Add ( trackballTooltip ) ;
1952
+ trackballTooltip . Duration = double . NaN ;
1953
+ trackballTooltip . Helper . CanNosePointTarget = true ;
1954
+ ContentList . Add ( trackballTooltip ) ;
1955
1955
}
1956
1956
1957
- return trackballView ;
1957
+ return trackballTooltip ;
1958
1958
}
1959
1959
1960
1960
static View ? GetTheTrackballTemplate ( DataTemplate trackballTemplate , object bindingContext )
@@ -1977,7 +1977,7 @@ void RemoveTrackballTemplateInfo(SfCartesianChart cartesianChart)
1977
1977
{
1978
1978
foreach ( var item in ContentList )
1979
1979
{
1980
- cartesianChart . BehaviorLayout . Remove ( item ) ;
1980
+ cartesianChart . _trackballView . Remove ( item ) ;
1981
1981
}
1982
1982
}
1983
1983
}
0 commit comments