Skip to content
New issue

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

Cannot change fillShadow on ProgressChart #715

Open
rook218 opened this issue Nov 21, 2023 · 1 comment
Open

Cannot change fillShadow on ProgressChart #715

rook218 opened this issue Nov 21, 2023 · 1 comment

Comments

@rook218
Copy link

rook218 commented Nov 21, 2023

I've been experimenting with this all morning. None of the fillShadow... props have any effect on ProgressChart. I'm trying to get my actual data to be brighter than the underlying line, because right now there is an issue with contrast where it's difficult for a user to see how much is filled at a quick glance.

I want the opacity of the data-filled portion of the ring to be around 0.2, while I want the opacity of the fill shadow to be about 0.9. The default is more like 0.4 vs 0.6

I'm not sure if there's something I'm not understanding about the API, but I would have expected the fillShadow... props to fix this, but they have no effect at all. If I am misunderstanding this then I will update the documentation with this info when someone corrects me.

	const chartData: ProgressChartData = {
		colors: [theme.colors.error],
		data: [percentOfMonthly]
	}
	const chartConfig: ChartConfig = {
		color: (opacity = 1) => hexToRgb(theme.colors.primary, opacity), // changing the opacity default arg also has no effect
		backgroundGradientFrom: theme.colors.background,
		backgroundGradientTo: theme.colors.background,
		// None of these properties have any effect at all
		fillShadowGradientFrom: 'rgb(255, 255, 255)',
		fillShadowGradientTo: 'rgb(255, 255, 255)',
		fillShadowGradient: 'rgb(255, 255, 255)',
		fillShadowGradientOpacity: 0.5,
		fillShadowGradientFromOpacity: 0.5,
		fillShadowGradientFromOffset: 0.5,
		fillShadowGradientToOpacity: 0.5,
		fillShadowGradientToOffset: 0.5,
	}
        ...
        ...
        ...
        <ProgressChart
	        chartConfig={chartConfig}
	        data={chartData}
	        width={50}
	        height={50}
	        radius={18}
	        strokeWidth={6}
	        hideLegend
        />
@rook218
Copy link
Author

rook218 commented Nov 21, 2023

I will note that I get the same behavior with values in different color formats. There is no effect with using 'rgb(255, 255, 255)', '#FFF' or '#FFFFFF'

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

No branches or pull requests

1 participant