File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ function render(data) {
157157 labels : {
158158 minWidth : 80 ,
159159 formatter : function ( val ) {
160- if ( val == null ) return ""
160+ if ( val == null ) return val
161161 return Number ( val . toFixed ( 8 ) ) . toString ( ) // Need to do a custom format of numbers to limit precision
162162 }
163163 }
@@ -295,6 +295,16 @@ function render(data) {
295295 text : title
296296 }
297297
298+ if ( chart == "trades" || chart == "volume" ) {
299+ // Using negative numbers so that they appear below the graph, but they are not really negative
300+ options . tooltip . y = {
301+ formatter : function ( val ) {
302+ if ( val == null ) return val
303+ return Number ( Math . abs ( val ) . toFixed ( 8 ) ) . toString ( )
304+ }
305+ }
306+ }
307+
298308 // Create the chart
299309 var div = document . querySelector ( "#" + chart )
300310 var chart = new ApexCharts ( div , options )
You can’t perform that action at this time.
0 commit comments