Skip to content

Commit

Permalink
fix timeseries chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ngamanda committed Sep 13, 2023
1 parent c596644 commit 31a6532
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,14 @@ export const TimeSeriesChart = ({
yScale={yScale ?? { type: 'linear' }}
>
<Axis
orientation="right"
orientation="bottom"
stroke={style?.axisColor}
strokeWidth={style?.axisWidth}
tickFormat={(tick) => formatNumber(tick)}
tickLabelProps={{ fill: 'black', fontFamily: 'inherit', fontSize: 10 }}
numTicks={3}
/>
<Axis
orientation="bottom"
orientation="right"
stroke={style?.axisColor}
strokeWidth={style?.axisWidth}
tickFormat={(tick) => (yAxis?.formatter ? yAxis.formatter(tick) : formatNumber(tick))}
Expand All @@ -131,14 +130,14 @@ export const TimeSeriesChart = ({
<>
<LineSeries
dataKey={line.name}
data={line.data.map((point) => ({ x: new Date(point.x).getTime().toString(), y: point.y }))}
data={line.data.map((point) => ({ x: new Date(point.x), y: point.y }))}
stroke={(style && style.lineColor) || lineColors[i]}
curve={curveMonotoneX}
{...accessors}
/>
<GlyphSeries
dataKey={line.name}
data={line.data.map((point) => ({ x: new Date(point.x).getTime().toString(), y: point.y }))}
data={line.data.map((point) => ({ x: new Date(point.x), y: point.y }))}
{...accessors}
/>
</>
Expand Down

0 comments on commit 31a6532

Please sign in to comment.