We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 649349a + 45afcf6 commit a942e92Copy full SHA for a942e92
packages/libs/components/src/plots/Barplot.tsx
@@ -121,7 +121,12 @@ const Barplot = makePlotlyPlotComponent(
121
orientation: orientation === 'vertical' ? 'v' : 'h',
122
opacity: calculatedOpacity,
123
type: 'bar',
124
- text: showValues ? el.value : undefined,
+ // two decimal points for y values
125
+ text: showValues
126
+ ? el.value.map(
127
+ (value: number) => `${Number.parseFloat(value.toFixed(2))}`
128
+ )
129
+ : undefined,
130
textposition: showValues ? 'auto' : undefined,
131
marker: {
132
color: el.color,
0 commit comments