File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
frontends/web/src/routes/account/summary Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,7 @@ export const Chart = ({
175175 formattedData . current = { } ;
176176
177177 chartData . forEach ( entry => {
178- if ( formattedData . current ) {
179- formattedData . current [ entry . time as number ] = entry . formattedValue ;
180- }
178+ formattedData . current [ entry . time as number ] = entry . formattedValue ;
181179 } ) ;
182180 } ;
183181
@@ -430,16 +428,13 @@ export const Chart = ({
430428 crosshairMarkerRadius : 6 ,
431429 } ) ;
432430 const isChartDisplayWeekly = chartDisplay === 'week' ;
433- lineSeries . current . setData (
434- isChartDisplayWeekly
435- ? data . chartDataHourly
436- : data . chartDataDaily
437- ) ;
438- setFormattedData (
431+ const dataToDisplay = (
439432 isChartDisplayWeekly
440433 ? data . chartDataHourly
441434 : data . chartDataDaily
442435 ) ;
436+ lineSeries . current . setData ( dataToDisplay ) ;
437+ setFormattedData ( dataToDisplay ) ;
443438 chart . current . timeScale ( ) . subscribeVisibleLogicalRangeChange ( calculateChange ) ;
444439 chart . current . subscribeCrosshairMove ( handleCrosshair ) ;
445440 chart . current . timeScale ( ) . fitContent ( ) ;
You can’t perform that action at this time.
0 commit comments