-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Radar chart + Bar Line chart Base + startAtZeroEnabled = false + negative values #166
Comments
Provide data here: data set 1: data set 2: xVals could be any string. |
Well this is not very clear to me. Can you show a visual example of how negative values should behave in a Radar chart vs. how it is now? |
After I apply the code change, it renders like above, which I think is correct. the center will be -100K, and the interval between each inner web is equal. You could compare it to the previous screenshot. As I mentioned in the pull request, the magic is |
@danielgindi I am starting using scatter chart view, and I find that these views also have such problems with the negative values and axis rendering. Are you aware of this? First thing is the interval is not correctly cacluated if it involves with negative values; apply my fix will solve it; second is the axis rendering about the minimum number is exceeding the bounds like below: When the axis comes to postive values, everything is fine; however when it is below zero, the y label can draw on out of the xAxis. |
I have also fixed the issue the negative axis labels will be drawn out bound in liuxuan30@226221c The interesting part is when the yAxis.entries contains negative values, the transformer will calculate a larger value than the viewPortHandler contentRect bound. I think the transformer is doing its job, just need to clip those labels that beyond the contentRect. |
I'm actually not seeing the problem in your screenshot. You are really not clear about this |
Focus on the inner web - don't you see the first one, the radar chart, there is a small one not like others? and the distance between each inner web is not equal. Say the -100K should be the center, but -100 ~ 0 distance is not equal 0 ~ 100K
Provide data here: data set 1: data set 2: Try this data |
When turning off startAtZeroEnabled, the negative values are not proper drawn. the radius ratio for each inner web is not correct.
The main trouble is:
Take an example if _chart.yAxis.entries is: [-100000.0, 0.0, 100000.0, 200000.0, 300000.0, 400000.0]
and _chart.chartYMin is -35991.2689931.
The minimum raw data is -7501.57 and max is 277395.38.
The text was updated successfully, but these errors were encountered: