-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stacked bar rounded corners for non-uniform datasets (#386)
Co-authored-by: David Josefson <[email protected]>
- Loading branch information
1 parent
ababd9a
commit e1f8914
Showing
6 changed files
with
265 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"example": patch | ||
"victory-native": patch | ||
--- | ||
|
||
Fix stacked bar rounded corners for non-uniform datasets and add support for positive and negative values in the same column. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import * as React from "react"; | ||
import { Pressable, StyleSheet, View } from "react-native"; | ||
import Ionicons from "@expo/vector-icons/Ionicons"; | ||
import { Text } from "./Text"; | ||
|
||
type Props = { | ||
label?: string; | ||
checked: boolean; | ||
onChange(): void; | ||
}; | ||
|
||
export const Checkbox = ({ label, checked, onChange }: Props) => { | ||
return ( | ||
<View style={{ flexDirection: "row", gap: 10, alignItems: "center" }}> | ||
<Pressable | ||
style={[styles.checkboxBase, checked && styles.checkboxChecked]} | ||
onPress={onChange} | ||
> | ||
{checked && <Ionicons name="checkmark" size={18} color="white" />} | ||
</Pressable> | ||
{label ? <Text>{label}</Text> : null} | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
checkboxBase: { | ||
width: 24, | ||
height: 24, | ||
justifyContent: "center", | ||
alignItems: "center", | ||
borderRadius: 4, | ||
borderWidth: 2, | ||
borderColor: "coral", | ||
backgroundColor: "transparent", | ||
}, | ||
checkboxChecked: { | ||
backgroundColor: "coral", | ||
}, | ||
}); |
Oops, something went wrong.