When formatting text with SI units we get the G prefix for numbers greater than 1E9. For plots with financial or economic data we want to change the G to the more business friendly B for billions. The example below shows $790M, $1.1G and $1.2G. How can we make this show $1.1B and $1.2B? This was discussed as a D3 issue here but I canโt figure out how to make this change within Plotly React.
import React from 'react';
import Plot from 'react-plotly.js';
class App extends React.Component {
render() {
return (
<Plot
data={[
{ type: "bar", x: [1, 2, 3], y: [789000000, 1120000000, 1220000000] }
]}
layout={{
width: 320,
height: 240,
title: "A Fancy Plot",
yaxis: {
tickformat: "$.2s", // want to show B instead of G for billions
hoverformat: "$,.2s" // want to show B instead of G for billions
}
}}
/>
);
}
}