File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Sources/Rendering/Core/ScalarBarActor/example Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 1
1
import 'vtk.js/Sources/favicon' ;
2
2
import * as d3 from 'd3-scale' ;
3
+ import { formatDefaultLocale } from 'd3-format' ;
3
4
4
5
// Load the rendering pieces we want to use (for both WebGL and WebGPU)
5
6
import 'vtk.js/Sources/Rendering/Profiles/Geometry' ;
@@ -51,6 +52,8 @@ function generateTicks(numberOfTicks) {
51
52
. range ( [ lastTickBounds [ 0 ] , lastTickBounds [ 1 ] ] ) ;
52
53
const samples = scale . ticks ( numberOfTicks ) ;
53
54
const ticks = samples . map ( ( tick ) => scale ( tick ) ) ;
55
+ // Replace minus "\u2212" with hyphen-minus "\u002D" so that parseFloat() works
56
+ formatDefaultLocale ( { minus : '\u002D' } ) ;
54
57
const format = scale . tickFormat (
55
58
ticks [ 0 ] ,
56
59
ticks [ ticks . length - 1 ] ,
You can’t perform that action at this time.
0 commit comments