2017-02-16 51 views
0

我想改变圆环图drawDirection财产Shinobi chart甜甜圈系列:如何更改drawDirection?

请看到这一点:https://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.8.7/Standard/Normal/html/Classes/SChartDonutSeries.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中做到这一点?

回答

1

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

pieSeries.drawDirection = .clockwise 

确保您使用的是最新版本的框架(这是目前2.9.3):

您可以用下面的代码设置您的饼图或圆环系列的平局方向斯威夫特3 。

让我知道如果您有任何问题。

+0

谢谢!我希望有更快的文档。 – Besat

0

我想通了,我可以将其设置是这样的:

donutSeries.drawDirection = SChartRadialSeriesDrawDirection(rawValue: 1)! 

如果有什么更好的办法来做到这一点,请让我知道。