【问题标题】:How to make circular Legend in corePlote?如何在corePlote中制作圆形图例?
【发布时间】:2014-02-24 12:04:00
【问题描述】:

我搜索了这个问题,但没有得到适当的答案。

我在我的应用程序中将 CorePlote 用于图形和图表。 我尝试将饼图图例自定义为圆形,但我没有找到任何方法或属性。

有人知道吗?

【问题讨论】:

  • 你检查过这个 chttps://code.google.com/p/core-plot/issues/detail?id=90

标签: ios iphone core-plot


【解决方案1】:

您可以使用半径的cornerRadius属性。
请尝试以下代码,希望对您有所帮助。

theLegend.cornerRadius = [theLegend.bounds.size.width/2];

这里theLegendCPTLegend的对象。

【讨论】:

  • 这没有帮助
【解决方案2】:

这种方法帮助我制作了圆形图例项:

let size = CGSize(width: 20, height: 20)
theLegend.swatchSize = size
theLegend.swatchCornerRadius = size.height

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-19
    • 2014-10-20
    • 2015-10-04
    • 2017-11-20
    • 2023-04-02
    • 1970-01-01
    相关资源
    最近更新 更多