We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to wrap texts in array for "long" strings?
I found "custom-react-d3-speedometer" but not compatible with react 17
Thanks for your great module by the way
The text was updated successfully, but these errors were encountered:
I don't see a reliable way to achieve this as the segment size can be very small and it could be very difficult to even display small length text.
You can try customSegmentLabels and control the position of the label (INSIDE/OUTSIDE). Something like
customSegmentLabels
INSIDE/OUTSIDE
<ReactSpeedometer width={400} height={400} paddingHorizontal={50} value={777} currentValueText="Happiness Level" customSegmentLabels={[ { text: "Very Bad", position: "INSIDE", color: "#555" }, { text: "Bad", position: "INSIDE", color: "#555" }, { text: "Ok", position: "INSIDE", color: "#555", fontSize: "19px" }, { text: "Good", position: "INSIDE", color: "#555" }, { text: "Very Good and a long text", position: "OUTSIDE", color: "#555" } ]} />
Codesandbox reference: https://codesandbox.io/s/busy-hamilton-u9kmyc?file=/src/App.js
Live example - https://palerdot.in/react-d3-speedometer/?path=/story/reactspeedometer--custom-segment-labels
Also, I'm open to some better solution/PR for this issue.
Sorry, something went wrong.
No branches or pull requests
Is there a way to wrap texts in array for "long" strings?![image](https://user-images.githubusercontent.com/35857601/154472781-d40b697b-6a51-4531-a1ff-3a678eda7958.png)
I found "custom-react-d3-speedometer" but not compatible with react 17
Thanks for your great module by the way
The text was updated successfully, but these errors were encountered: