Adjust x axis
This commit is contained in:
parent
f65b50b4ff
commit
730754cf82
|
|
@ -10,6 +10,7 @@ import {
|
||||||
Tooltip
|
Tooltip
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import { useTheme } from "@material-ui/styles";
|
import { useTheme } from "@material-ui/styles";
|
||||||
|
import { linspace } from "./utils";
|
||||||
|
|
||||||
function PriceSimulationChart({
|
function PriceSimulationChart({
|
||||||
priceTimeseries,
|
priceTimeseries,
|
||||||
|
|
@ -67,6 +68,13 @@ function PriceSimulationChart({
|
||||||
dataKey={keyHorizontal}
|
dataKey={keyHorizontal}
|
||||||
tick={{ fill: theme.palette.text.secondary }}
|
tick={{ fill: theme.palette.text.secondary }}
|
||||||
stroke={theme.palette.text.secondary}
|
stroke={theme.palette.text.secondary}
|
||||||
|
ticks={[
|
||||||
|
...linspace({
|
||||||
|
to: priceTimeseries.length,
|
||||||
|
steps: 4
|
||||||
|
}).map(Math.floor),
|
||||||
|
priceTimeseries.length - 1
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
<YAxis
|
<YAxis
|
||||||
yAxisId="left"
|
yAxisId="left"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ const theme = createMuiTheme({
|
||||||
main: "#2ecd79"
|
main: "#2ecd79"
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
main: "#b44a9b"
|
main: "#116be0"
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
main: red.A400
|
main: red.A400
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue