Adjust x axis

This commit is contained in:
dapplion 2019-08-02 11:41:15 +02:00
parent f65b50b4ff
commit 730754cf82
2 changed files with 9 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import {
Tooltip
} from "recharts";
import { useTheme } from "@material-ui/styles";
import { linspace } from "./utils";
function PriceSimulationChart({
priceTimeseries,
@ -67,6 +68,13 @@ function PriceSimulationChart({
dataKey={keyHorizontal}
tick={{ fill: theme.palette.text.secondary }}
stroke={theme.palette.text.secondary}
ticks={[
...linspace({
to: priceTimeseries.length,
steps: 4
}).map(Math.floor),
priceTimeseries.length - 1
]}
/>
<YAxis
yAxisId="left"

View File

@ -9,7 +9,7 @@ const theme = createMuiTheme({
main: "#2ecd79"
},
secondary: {
main: "#b44a9b"
main: "#116be0"
},
error: {
main: red.A400