File tree Expand file tree Collapse file tree 3 files changed +11
-16
lines changed Expand file tree Collapse file tree 3 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 161161 "@docsearch/react" : " ^3.0.0-alpha.37" ,
162162 "@influxdata/clockface" : " ^3.1.8" ,
163163 "@influxdata/flux-lsp-browser" : " ^0.8.0" ,
164- "@influxdata/giraffe" : " ^2.23.0 " ,
164+ "@influxdata/giraffe" : " ^2.23.1 " ,
165165 "@influxdata/influxdb-templates" : " 0.9.0" ,
166166 "@influxdata/react-custom-scrollbars" : " 4.3.8" ,
167167 "abortcontroller-polyfill" : " ^1.3.0" ,
Original file line number Diff line number Diff line change @@ -35,18 +35,13 @@ export const formatStatValue = (
3535
3636 digits = Math . min ( digits , MAX_DECIMAL_PLACES )
3737
38- if ( typeof value === 'number' ) {
39- const [ wholeNumber , fractionalNumber ] = Number ( value )
40- . toFixed ( digits )
41- . split ( '.' )
42-
43- localeFormattedValue = Number ( wholeNumber ) . toLocaleString ( undefined , {
44- maximumFractionDigits : MAX_DECIMAL_PLACES ,
45- } )
38+ const formatter = Intl . NumberFormat ( undefined , {
39+ minimumFractionDigits : digits ,
40+ maximumFractionDigits : digits ,
41+ } )
4642
47- if ( fractionalNumber ) {
48- localeFormattedValue += `.${ fractionalNumber } `
49- }
43+ if ( typeof value === 'number' ) {
44+ localeFormattedValue = formatter . format ( Number ( value ) )
5045 } else if ( typeof value === 'string' ) {
5146 localeFormattedValue = value
5247 } else {
Original file line number Diff line number Diff line change 11001100 resolved "https://registry.yarnpkg.com/@influxdata/flux-lsp-browser/-/flux-lsp-browser-0.8.0.tgz#2b0b8d543f9b89e73ee2379a90aa66499fa92026"
11011101 integrity sha512-A7bGnbDzOnsEIAYpxuqdKJjPbtlP5H5EcXsqdpMISdp80y0TBbGv41U3dsfrOIPENvXNYLjroIvp6QYnnF/uaw==
11021102
1103- "@influxdata/giraffe@^2.23.0 ":
1104- version "2.23.0 "
1105- resolved "https://registry.yarnpkg.com/@influxdata/giraffe/-/giraffe-2.23.0 .tgz#3032a6e3266b44e6dd1b3c18474d3a818bcac909 "
1106- integrity sha512-HVIRU63GFKaAF5Y7ygwtxzabKTRvMxbZY50sqk2xzVxHO0dlp2xTHIYUlikNyaWh41RLI7lu4ESOkNQ2ZraNIQ ==
1103+ "@influxdata/giraffe@^2.23.1 ":
1104+ version "2.23.1 "
1105+ resolved "https://registry.yarnpkg.com/@influxdata/giraffe/-/giraffe-2.23.1 .tgz#d06b6409042988f32e75bf473e76fee736f072ab "
1106+ integrity sha512-ReV3sM59F8p8EE8cGtS+5dhsknB6bLx1cnF+jHBxVAaVKbZKypmdO89XuZV2nt/BidSpglK7cQ/pwcKvcGWQ0Q ==
11071107 dependencies:
11081108 merge-images "^2.0.0"
11091109
You can’t perform that action at this time.
0 commit comments