Skip to content

Commit

Permalink
fix(stream): fix stream diagram overflowing
Browse files Browse the repository at this point in the history
The stream diagram was overflowing. Particularly in the "silhouette"
mode. This was introduced in d53681b
where the d3 scale was replaced with the nivo equivalent. While ignoring
that the min value might be negative thus must be put into the first
parameter.
  • Loading branch information
baldulin committed Jul 20, 2023
1 parent 2250a31 commit 1e63512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/stream/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const useStream = <RawDatum extends StreamDatum>({
width
)
const yScale = createLinearScale(
{ type: 'linear' },
{ type: 'linear', min: minValue },
{ all: [minValue, maxValue], min: minValue, max: maxValue },
height,
'y'
Expand Down

0 comments on commit 1e63512

Please sign in to comment.