Where does graphael (line chart) calculates it's maximum value?

爷,独闯天下 提交于 2020-01-06 13:55:13

问题


I am facing a very serious bug using graphael. Therefore, I want to change the procedure it uses to calculate the maximum value for the y axis. However, It's way to confusing for me, and I cannot find it. Can anyone help me to change that procedure?


回答1:


Sorry, I don't have any experience with gRaphael, but since no one else has answered, I might be able to help you somewhat...

The code for gRaphael's LineChart is located here.

Normally, I would suggest overriding the function that calculates the y axis max value, but since that object is enclosed in a private scope, you will only be able to change the code, directly, through a local copy of that file.

I only skimmed the code, but was not able to find where in it the actual calculation was being done.




回答2:


It calculates them through the .snapEnds() method in gRaphael core. If you want, you can expose the values to the linechart options using this method.



来源:https://stackoverflow.com/questions/21098797/where-does-graphael-line-chart-calculates-its-maximum-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!