Skip to content

Commit

Permalink
Merge pull request #91 from shipt/development
Browse files Browse the repository at this point in the history
  • Loading branch information
jkhusanov authored May 13, 2024
2 parents 151b732 + 9a404f6 commit f14d8e6
Show file tree
Hide file tree
Showing 13 changed files with 780 additions and 47 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## v1.1.0

- Use arc calculations to render range values https://github.com/shipt/segmented-arc-for-react-native/pull/86
- Arc drawing fix https://github.com/shipt/segmented-arc-for-react-native/pull/87
- Readme updates

## v1.1.0

- Add a support for scaling the display scale of arc segments https://github.com/shipt/segmented-arc-for-react-native/pull/70
- Dependency updates

Expand Down
67 changes: 47 additions & 20 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@
nullthrows "^1.1.1"

"@shipt/segmented-arc-for-react-native@file:..":
version "1.1.1"
version "1.2.1"
dependencies:
prop-types "^15.8.1"

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shipt/segmented-arc-for-react-native",
"version": "1.1.1",
"version": "1.2.1",
"type": "module",
"description": "Segmented arc component for React Native ",
"main": "src/index.js",
Expand Down
11 changes: 8 additions & 3 deletions src/SegmentedArc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const SegmentedArc = ({
rangesTextStyle = styles.rangeTextStyle,
capInnerColor = '#28E037',
capOuterColor = '#FFFFFF',
alignRangesWithSegments = true,
children
}) => {
const [arcAnimatedValue] = useState(new Animated.Value(0));
Expand Down Expand Up @@ -147,6 +148,7 @@ export const SegmentedArc = ({
<Svg width={svgWidth} height={svgHeight}>
<SegmentedArcContext.Provider
value={{
arcs,
margin,
center,
filledArcWidth,
Expand All @@ -164,7 +166,8 @@ export const SegmentedArc = ({
rangesTextColor,
rangesTextStyle,
capInnerColor,
capOuterColor
capOuterColor,
alignRangesWithSegments
}}
>
{arcs.map((arc, index) => (
Expand Down Expand Up @@ -198,7 +201,8 @@ SegmentedArc.propTypes = {
scale: PropTypes.number,
filledColor: PropTypes.string.isRequired,
emptyColor: PropTypes.string.isRequired,
data: PropTypes.object
data: PropTypes.object,
arcDegreeScale: PropTypes.number
})
).isRequired,
filledArcWidth: PropTypes.number,
Expand All @@ -216,7 +220,8 @@ SegmentedArc.propTypes = {
rangesTextColor: PropTypes.string,
rangesTextStyle: PropTypes.object,
capInnerColor: PropTypes.string,
capOuterColor: PropTypes.string
capOuterColor: PropTypes.string,
alignRangesWithSegments: PropTypes.bool
};
export { SegmentedArcContext };
export default SegmentedArc;
Loading

0 comments on commit f14d8e6

Please sign in to comment.