Swift3 Shinobi chart甜甜圈系列:如何改变方向?

Swift3 Shinobi chart甜甜圈系列:如何改变方向?,swift3,shinobi,Swift3,Shinobi,我想更改圆环图中的drawDirection属性 请看这个: 这是我指的代码的一部分: typedef NS_ENUM(NSInteger, SChartRadialSeriesDrawDirection) { SChartRadialSeriesDrawDirectionAntiClockwise, SChartRadialSeriesDrawDirectionClockwise }; @interface SChartDonutSeries : SChartRadialSe

我想更改圆环图中的drawDirection属性

请看这个:

这是我指的代码的一部分:

typedef NS_ENUM(NSInteger, SChartRadialSeriesDrawDirection) {
    SChartRadialSeriesDrawDirectionAntiClockwise,
    SChartRadialSeriesDrawDirectionClockwise
};

@interface SChartDonutSeries : SChartRadialSeries
#pragma mark -
#pragma mark Drawing the series
/** @name Drawing the series */

/** The direction in which data is drawn around the centre of the plot.

 - SChartRadialSeriesDrawDirectionClockwise: Configures the direction in which the data is drawn around the center of the plot to be clockwise.
 - SChartRadialSeriesDrawDirectionAntiClockwise: Configures the direction in which the data is drawn around the center of the plot to be anticlockwise.

 This defaults to `SChartRadialSeriesDrawDirectionAntiClockwise`.
 */
@property (nonatomic) SChartRadialSeriesDrawDirection drawDirection;
@end
这是我的代码:

let donutSeries = SChartDonutSeries()
donutSeries.drawDirection = SChartRadialSeriesDrawDirection.SChartRadialSeriesDrawDirectionClockwise

如何在swift 3中实现这一点?

我发现可以这样设置:

donutSeries.drawDirection = SChartRadialSeriesDrawDirection(rawValue: 1)!

如果有更好的方法,请告诉我。

免责声明我是ShinobiControls的开发人员

您可以使用以下代码在Swift 3中设置饼或甜甜圈系列的绘制方向:

pieSeries.drawDirection = .clockwise
确保您使用的是我们框架的最新版本(目前为2.9.3)


如果您有任何问题,请告诉我。

谢谢!我希望swift有更好的文档。