@@ -135,6 +135,9 @@ export class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
135
135
const yKey = set . yProperty ;
136
136
const highlights : Highlight [ ] = [ ] ;
137
137
138
+ if ( set [ 'setIgnoreFiltered' ] ) {
139
+ ( set as LineDataSet ) . setIgnoreFiltered ( true ) ;
140
+ }
138
141
//noinspection unchecked
139
142
let entries = set . getEntriesAndIndexesForXValue ( xVal ) ;
140
143
if ( entries . length === 0 ) {
@@ -149,14 +152,9 @@ export class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
149
152
150
153
for ( const r of entries ) {
151
154
const e = r . entry ;
152
- let index = r . index ;
153
- const xVal = set . getEntryXValue ( e , r . index ) ;
155
+ const index = r . index ;
156
+ const xVal = set . getEntryXValue ( e , index ) ;
154
157
const pixels = this . mChart . getTransformer ( set . getAxisDependency ( ) ) . getPixelForValues ( xVal , e [ yKey ] ) ;
155
- if ( ( set as any ) . isFiltered && ( set as LineDataSet ) . isFiltered ( ) ) {
156
- ( set as LineDataSet ) . setIgnoreFiltered ( true ) ;
157
- index = set . getEntryIndexForXValue ( xVal , NaN , Rounding . CLOSEST ) ;
158
- ( set as LineDataSet ) . setIgnoreFiltered ( false ) ;
159
- }
160
158
161
159
highlights . push ( {
162
160
entry : e ,
@@ -169,6 +167,9 @@ export class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
169
167
axis : set . getAxisDependency ( )
170
168
} ) ;
171
169
}
170
+ if ( set [ 'setIgnoreFiltered' ] ) {
171
+ ( set as LineDataSet ) . setIgnoreFiltered ( false ) ;
172
+ }
172
173
173
174
return highlights ;
174
175
}
0 commit comments