Open Ramso-dev opened 7 years ago
@Ramso-dev did you manage to work around this?
+1
Hi! I was able to write a workaround but sadly the project I was working on at that time got canceled and I have no access to that code. I remember it was kinda easy to do, at least for my needs. There was some lines where the value was being rounded somewhere in the legend or the pie-chart component if i remember well but can't help you further.
I'm submitting a ... (check one with "x")
Current behavior I have the following data set:
export var data = [{"name":"Remaining memory","value":14.507041931152344},{"name":"quizmasterdb-3-n8bnn","value":0.047496795654296875},{"name":"jenkins-6-5o01y","value":2.0730514526367188}]
My advance Pie Chart shows the following: Total (GiB): 17 Remaining memory:15 quizmasterdb-3-n8bnn: 0,05 jenkins-6-5o01y: 2,07
Expected behavior
I notice here that the smallest numbers are being rounded with 2 decimals as expected but the biggest one and the total are being excesively rounded (Up to 0,5GiB). And thats too much loss of precision. Should be like this: Total (GiB): 16,63 -> better precision !! Remaining memory: 14,51 -> better precision !! quizmasterdb-3-n8bnn: 0,05 -> good enough jenkins-6-5o01y: 2,07 -> good enough
Reproduction of the problem Plunker: https://plnkr.co/edit/DOLe6qFvQGJSH37BCATe?p=preview
What is the motivation / use case for changing the behavior? I need a better precision for memory monitoring.
ngx-charts version: 6.1.0
Angular version: 4.0.0
Browser: Chrome | Firefox
Language: TypeScript 2.2.0