是否可以在ios图表中的图例之间添加空格?

问题描述 投票:0回答:1

所以我想在多线图的图例之间添加空格。只有调整中心|的选项离开|对

它现在看起来如何 - 标签根据“标签尺寸”对齐:enter image description here

我想要的样子 - 它应该是3列,每列2个标签或者,可以为每个图例添加一些空间或设置最小尺寸:qazxsw poi

这是启用图例的代码的一部分。

enter image description here

我试过了chartView.legend.stackSpace | chartView.legend.xEntrySpace | chartView.legend.yEntrySpace但似乎没有任何改变。

有人可以帮忙吗?

ios ios-charts
1个回答
0
投票

请使用 lineChartView.legend.enabled = true lineChartView.legend.horizontalAlignment = .center 作为legend.yEntrySpace = "value"

© www.soinside.com 2019 - 2024. All rights reserved.