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

White lines are visible near rectangular items. #11

Open
aregpetrosyan opened this issue Dec 21, 2021 · 9 comments
Open

White lines are visible near rectangular items. #11

aregpetrosyan opened this issue Dec 21, 2021 · 9 comments

Comments

@aregpetrosyan
Copy link

Hello. white lines are visible near rectangular items, how this issue can be solved?

@overpas
Copy link
Owner

overpas commented Dec 21, 2021

Hello, could you post a picture of that and the code you are using?

@aregpetrosyan
Copy link
Author

Screen Shot 2021-12-22 at 10 23 58

TreemapChart(
data = local,
evaluateItem = { it.percent },
treemapChartMeasurer = remember { SquarifiedMeasurer() },
modifier = modifier.fillMaxWidth(),
) { item ->
TreemapItem(item = item, onClick = onClick)
}

@overpas
Copy link
Owner

overpas commented Dec 22, 2021

@aregpetrosyan If when you use the SliceAndDiceMeasurer the lines are no longer there, then this problem has to do with the algorithm for calculating node sizes. Can't offer a quick solution for this right now

@aregpetrosyan
Copy link
Author

thanks for the answer, could you point to the part where squarified sizes are calculated, so we can have a look

@aregpetrosyan
Copy link
Author

I checked, in the case of SliceAndDiceMeasurer the issue also occurs.

@overpas
Copy link
Owner

overpas commented Dec 23, 2021

I think it's related to how your percent variable is calculated, though. You might lose some precision there. I've modified the sample a bit and managed to reproduce similar lines with incorrect values (the background is white and all nodes' backgrounds are red):
device-2021-12-23-172827

@aregpetrosyan
Copy link
Author

Thanks for the answer, will have a look

@aregpetrosyan
Copy link
Author

Are there percent values which would prevent these white values?

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

2 participants