2017-02-16 1 views
0

私はShinobi chartドーナッツシリーズ:drawDirectionを変更するには?

これを見てくださいドーナツグラフで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 

私は迅速に3でそれを行うことができますか?

答えて

1

免責事項私はShinobiControlsの開発者です。

次のコードでスウィフト3であなたのパイやドーナツシリーズの延伸方向を設定することができます(現在は2.9.3です)あなたが私たちのフレームワークの最新バージョンを使用していることを確認し

pieSeries.drawDirection = .clockwise 

は、ご質問があれば私に教えてください。

+0

ありがとうございました!私は、迅速な文書がより良いことを願っています。 – Besat

0

私はこのようにそれを設定することができることを考え出し:

donutSeries.drawDirection = SChartRadialSeriesDrawDirection(rawValue: 1)! 

私に知らせてください、それを行うための任意のより良い方法がある場合。

関連する問題