Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Commit

Permalink
Step chart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aleib committed Aug 4, 2017
1 parent 36bbb6f commit 6c091a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/MultiLineUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const getComposedData = (chartProps, type, xAxis, yAxis, dataKey,
for (var i = startIndex; i <= endIndex; i++) {
const dataPoint = chartProps.data[i];
const value = _.get(dataPoint, dataKey, null)
const extend = i === endIndex && (type === 'stepAfter' || value === null)
const extend = i === endIndex && startIndex !== endIndex && (type === 'stepAfter' || value === null)
const yDataPoint = extend ? chartProps.data[i - 1] : chartProps.data[i];

const prevYPointWasNull = i === startIndex || _.get(chartProps.data[i - 1], dataKey, null) === null
Expand Down

0 comments on commit 6c091a4

Please sign in to comment.