File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ const AreaChart: React.FC<AreaChartProps> = ({
3939 const yMin = yAxisValues
4040 ? Math . min ( ...yAxisValues . map ( ( val ) => Number ( val ) ) )
4141 : 0 ;
42-
4342 const options = {
4443 chart : {
4544 sparkline : {
Original file line number Diff line number Diff line change 1919 justify-content : space-between ;
2020 margin-right : 8px ;
2121 margin-bottom : 32px ;
22+ width : 43px ;
2223 & p {
2324 font-size : 10px ;
2425 font-weight : 500 ;
Original file line number Diff line number Diff line change @@ -68,13 +68,16 @@ const AnalyticsLiquidityChart: React.FC<{
6868
6969 const minVolume = Math . floor ( Math . min ( ...dailyVolumes ) ) ;
7070 const maxVolume = Math . ceil ( Math . max ( ...dailyVolumes ) ) ;
71-
7271 const values : any [ ] = [ ] ;
7372 // show 10 values in the y axis of the graph
74- const step = ( maxVolume - minVolume ) / 10 ;
73+ const step = ( maxVolume - minVolume ) / 9 ;
7574 if ( step > 0 ) {
76- for ( let i = maxVolume ; i >= minVolume ; i -= step ) {
77- values . push ( Math . floor ( i ) ) ;
75+ for ( let i = 9 ; i >= 0 ; i -- ) {
76+ const value = minVolume + ( i * ( maxVolume - minVolume ) ) / 9 ;
77+ if ( values . includes ( value ) ) {
78+ continue ;
79+ }
80+ values . push ( value ) ;
7881 }
7982 } else {
8083 values . push ( minVolume ) ;
You can’t perform that action at this time.
0 commit comments