2017-02-16 3 views
0

Ich möchte diese drawDirection Eigenschaft in RingdiagrammShinobi-Diagramm Donut-Serie: Wie DrawDirection ändern?

Bitte sehen ändern: https://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.8.7/Standard/Normal/html/Classes/SChartDonutSeries.html dieser Teil mich beziehe ich des Codes ist

:

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 

dies ist mein Code:

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

Wie kann ich das in Swift 3 tun?

Antwort

1

DISCLAIMER Ich bin Entwickler bei ShinobiControls.

Sie können die Zugrichtung der Kreis- oder Ring Serie in Swift 3 mit dem folgenden Code ein:

pieSeries.drawDirection = .clockwise 

Stellen Sie sicher, dass die neueste Version unseres Rahmen verwenden (das ist derzeit 2.9.3) .

Lassen Sie mich wissen, wenn Sie irgendwelche Fragen haben.

+0

Vielen Dank! Ich wünschte, es gäbe eine bessere Dokumentation für Swift. – Besat

0

Ich fand heraus, dass ich es so einstellen:

donutSeries.drawDirection = SChartRadialSeriesDrawDirection(rawValue: 1)! 

Wenn es einen besseren Weg, um es mir bitte zu tun ist, wissen zu lassen.