Skip to content

Conversation

@yoelbassin
Copy link

Hey!
Have been using this project for a while now, and always had this problem, so I decided to create a PR about it.

Until now, when using fluidWidth={true}, the gauge filled the entire div it was in, even though it used only half of the space.

Case study 1:

<Box width={300} height={400}>
    <ReactSpeedometer
        ringWidth={40}
        fluidWidth={true}
        minValue={100}
        maxValue={500}
        value={473}
        needleColor="steelblue"
    />
</Box>

Before:

After:

Case study 2:

<Box width={500} height={200}>
    <ReactSpeedometer
        ringWidth={40}
        fluidWidth={true}
        minValue={100}
        maxValue={500}
        value={473}
        needleColor="steelblue"
    />
</Box>

Before:

After:

@palerdot palerdot changed the base branch from master to react-v18 February 19, 2023 03:23
@palerdot palerdot changed the base branch from react-v18 to master February 19, 2023 03:24
@palerdot
Copy link
Owner

@yoelbassin Thanks for the PR. Much appreciated.

Can you change the base of the branch to https://github.com/palerdot/react-d3-speedometer/tree/react-v18 react-v18 branch and make changes against that? v18 branch will be made master/stable soon, and all the future enhancements will be made against this branch. The new branch has some changes with respect to tests, and other files and there will be conflicts.

If you can change the base and update the PR against react-v18 branch, I will check and merge and release it as next rc version for v18.

@yoelbassin
Copy link
Author

Reopened in #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants