作者:真理难辩_175 | 来源:互联网 | 2023-05-16 20:37
I have a problem with the Charts library. The problem I am facing is that the bar graph is not "fit" within the borders of my view. The following image shows that, the both first and last bar are cut into half and label of the highest bar is also partially cut.
我的图表库有问题。我面临的问题是条形图在我的视图边界内“不适合”。下图显示,第一个和最后一个条都被切成两半,最高条的标签也被部分切割。
Bars and labels are cut along the graph borders
沿图形边界切割条形和标签
When I search online, I got the following thread https://github.com/danielgindi/Charts/issues/353 which seems to describe the exact same issue.
当我在网上搜索时,我得到了以下主题https://github.com/danielgindi/Charts/issues/353,这似乎描述了完全相同的问题。
I use a simple dataset with some random numbers at 6 indices. The data is added to the chart as follows:
我使用一个简单的数据集,其中包含6个索引的随机数。数据添加到图表中,如下所示:
let values: [Int] = [5, 8, 1, 2, 1, 2]
var dataEntries: [BarChartDataEntry]
for i in 0..
Hopefully someone can help me out. Thanks in advance!
希望有人可以帮助我。提前致谢!
4 个解决方案