我想在甜甜圈图中更改DrawDirection属性
请参阅此信息:https://www.shinobicontrols.com/docs/shinobicontrols/shinobicharts/shinobicharts/2.8.7/standard/standard/normal/html/html/classes/schartdonutseries.htmlseries.html
这是我指的代码的一部分:
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中执行此操作?
免责声明我是Shinobicontrols的开发人员。
您可以在Swift 3中使用以下代码设置PIE或DONUT系列的抽奖方向:
pieSeries.drawDirection = .clockwise
确保您使用的是我们的框架的最新版本(当前是2.9.3)。
让我知道您是否有任何疑问。
我想知道我可以这样设置:
donutSeries.drawDirection = SChartRadialSeriesDrawDirection(rawValue: 1)!
如果有更好的方法可以做到。