File tree 1 file changed +12
-3
lines changed
data-api/src/main/resources/templates 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1499,7 +1499,7 @@ <h4 class="footer-title">Social</h4>
1499
1499
} ,
1500
1500
{
1501
1501
label : `${ tokenData . tokenSymbol } Outflow` ,
1502
- data : outflowData ,
1502
+ data : outflowData . map ( value => - value ) , // Make outflow negative
1503
1503
backgroundColor : function ( context ) {
1504
1504
const chart = context . chart ;
1505
1505
const { ctx, chartArea} = chart ;
@@ -2109,7 +2109,9 @@ <h4 class="footer-title">Social</h4>
2109
2109
label += ': ' ;
2110
2110
}
2111
2111
if ( context . parsed . y !== null ) {
2112
- label += parseFloat ( context . parsed . y . toFixed ( 2 ) ) . toLocaleString ( ) ;
2112
+ // Get the absolute value for display
2113
+ const value = Math . abs ( context . parsed . y ) ;
2114
+ label += parseFloat ( value . toFixed ( 2 ) ) . toLocaleString ( ) ;
2113
2115
}
2114
2116
return label ;
2115
2117
}
@@ -2158,8 +2160,15 @@ <h4 class="footer-title">Social</h4>
2158
2160
font : {
2159
2161
family : "'Inter', sans-serif" ,
2160
2162
size : 11
2163
+ } ,
2164
+ callback : function ( value ) {
2165
+ // Show absolute values for ticks to avoid -0
2166
+ return Math . abs ( value ) . toLocaleString ( ) ;
2161
2167
}
2162
- }
2168
+ } ,
2169
+ // Ensure the chart shows negative values properly
2170
+ stacked : false ,
2171
+ beginAtZero : false
2163
2172
}
2164
2173
}
2165
2174
}
You can’t perform that action at this time.
0 commit comments