File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -972,6 +972,7 @@ function setActivePoint(chart, index) {
972972 datasetIndex : 2 ,
973973 index : index
974974 } ] ) ;
975+ chart . data . datasets [ 2 ] . data = [ ...chart . data . datasets [ 2 ] . data ] ;
975976 chart . update ( ) ;
976977}
977978
@@ -1159,30 +1160,26 @@ async function loadForecast() {
11591160 }
11601161 } ,
11611162 onClick : ( event , elements , chart ) => {
1162- const points = chart . getElementsAtEventForMode (
1163- event ,
1164- 'index' , {
1165- intersect : false
1166- } ,
1167- true
1168- ) ;
1169- if ( points . length ) {
1163+ const points = chart . getElementsAtEventForMode (
1164+ event ,
1165+ 'index' ,
1166+ { intersect : false } ,
1167+ true
1168+ ) ;
1169+ if ( points . length ) {
11701170 const index = points [ 0 ] . index ;
11711171 showShapDetails ( forecast [ index ] ) ;
1172- activeForecastIndex = index ;
11731172 setActivePoint ( chart , index ) ;
11741173 }
1175- } ,
1174+ } ,
11761175 onHover : ( event , elements , chart ) => {
11771176 if ( elements . length ) {
11781177 const index = elements [ 0 ] . index ;
1179-
11801178 chart . setActiveElements ( [ {
11811179 datasetIndex : 2 ,
11821180 index : index
11831181 } ] ) ;
1184-
1185- chart . update ( ) ;
1182+ chart . update ( 'none' ) ;
11861183 } else {
11871184 setActivePoint ( chart , activeForecastIndex ) ;
11881185 }
You can’t perform that action at this time.
0 commit comments