Skip to content

Commit

Permalink
format y axis
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Brett authored and Ed Brett committed Dec 18, 2020
1 parent 322512d commit 0d19794
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
7 changes: 1 addition & 6 deletions components/charts/composed-chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ const CustomComposedChart = ({ className, data, config }) => (
))}
<ReferenceLine x={config?.xReference} stroke="#FF8576" />
<XAxis {...config?.xAxis} />
<YAxis
axisLine={false}
tickLine={false}
dataKey={config?.yAxis}
tickMargin={10}
/>
<YAxis {...config?.yAxis} />
</ComposedChart>
</ResponsiveContainer>
</div>
Expand Down
11 changes: 7 additions & 4 deletions components/widgets/asset-risk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,27 @@ const WidgetAssetRisk = ({ params }) => (
stroke: '#555555',
opacity: 0.2,
strokeWidth: 0,
background: false,
activeDot: false,
},
{
dataKey: 'upperStddev',
fill: '#555555',
stroke: '#555555',
opacity: 0.2,
strokeWidth: 0,
background: false,
activeDot: false,
},
],
xAxis: {
dataKey: 'month',
interval: 0,
tickFormatter: (t) =>
formatDate(new Date(`2020-${t > 9 ? t : `0${t}`}-01`), 'MMM'),
axisLine: false,
tickLine: false,
},
yAxis: {
tickFormatter: (t) => `${t}°C`,
axisLine: false,
tickLine: false,
},
xReference: `${params?.year}`,
}}
Expand Down

1 comment on commit 0d19794

@vercel
Copy link

@vercel vercel bot commented on 0d19794 Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.