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

Center - Transparent Background #1

Closed
rebz opened this issue Jan 4, 2019 · 2 comments
Closed

Center - Transparent Background #1

rebz opened this issue Jan 4, 2019 · 2 comments
Labels
question Further information is requested

Comments

@rebz
Copy link

rebz commented Jan 4, 2019

Would be great if the center of the donut had a transparent background. Haven't looked through the code for how it is currently implemented. Using this inside a striped table and want the table color to come through.

@dumptyd
Copy link
Owner

dumptyd commented Jan 5, 2019

The center is actually an overlay on top of a pie chart to make it look like a donut, so background-color: inherit; is not going to work. You can specify the background for it using the background prop.

However, I think I could implement a prop that gets the container's background color using getComputedStyle and applies that as the overlay's background.

For now, you can try to modify the behavior using CSS.

/* apply !important if necessary */
.striped-table tr:nth-child(even) .cdc-overlay { background-color: 'white'; }
.striped-table tr:nth-child(odd) .cdc-overlay { background-color: 'grey'; }

Something like this should work.

@rebz
Copy link
Author

rebz commented Jan 5, 2019

Yeah that technically works. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants