作者:司文龙2502933797 | 来源:互联网 | 2023-05-18 07:59
ImusingthefabulousiOSChartslibrary(https:github.comdanielgindiios-charts)andImhaving
I'm using the fabulous iOS Charts library (https://github.com/danielgindi/ios-charts) and I'm having a hard time finding anything to support this behavior in the documentation. I'd like to force the y-axis to always display a range from 0-35. Currently, if I only have one data entry in at say (0, 9) the y-axis will display its range as 0-9. However when I add another entry at (1, 32) suddenly I can see the top of the graph at 35.
我正在使用令人难以置信的iOS Charts库(https://github.com/danielgindi/ios-charts),我在文档中很难找到支持这种行为的任何东西。我想强迫y轴总是显示0-35的范围。目前,如果我只有一个数据输入(0,9),y轴将显示其范围为0-9。然而,当我在(1,32)中添加另一个条目时,我突然可以看到图的顶部是35。
There are three methods that look promising (because they're related) but they aren't quite providing the type of behavior that I'm looking for.
有三种方法看起来很有前途(因为它们是相关的),但是它们并不能提供我所要寻找的行为类型。
1: Chart.setVisibleYRangeMaximum
(if only it were Minimum
...)
1:图表。setVisibleYRangeMaximum(如果它是最小的…)
2: Chart.setVisibleXRangeMaximum
(useless again...)
2:图表。setVisibleXRangeMaximum(无用的了…)
3: Chart.setVisibleXRangeMinimum
(now where's your YRange
cousin?!)
3:图表。setvisiblexrangimum(现在你的YRange表兄弟在哪里?!)
So anyways, that's where I'm at. I've read documentation but to no avail. Help me SO?
无论如何,这就是我现在的处境。我读过文档,但都没用。帮我吗?
3 个解决方案