Skip to content

Instantly share code, notes, and snippets.

@touyu
Created February 1, 2016 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save touyu/f8db7443b711ff8a6557 to your computer and use it in GitHub Desktop.
Save touyu/f8db7443b711ff8a6557 to your computer and use it in GitHub Desktop.
[Swift] [iOS] チャート表示ライブラリ [ios-charts] 軸に関する設定 ref: http://qiita.com/touyu/items/b4011e260cc22d0af8d5
// 軸のラベル(目盛)のフォント、テキストカラー
.labelFont = UIFont.systemFontOfSize(10.0)
.labelTextColor = UIColor.blackColor()
// 軸の色、太さ
axisLineColor = UIColor.grayColor()
axisLineWidth = CGFloat(0.5)
// グリッド線の色、太さ
.gridColor = UIColor.grayColor().colorWithAlphaComponent(0.9)
.gridLineWidth = CGFloat(0.5)
// グリッド線の表示
.drawGridLinesEnabled = true
// 軸の表示
.drawAxisLineEnabled = true
// ラベル(目盛)の表示
.drawLabelsEnabled = true
// ?
.drawLimitLinesBehindDataEnabled = false
// Y軸のラベル(目盛)の個数
.labelCount = Int(6)
// Y軸の一番上のラベルの表示
.drawTopYLabelEntryEnabled = true
// Y軸の最小値、最大値だけ表示
.showOnlyMinMaxEnabled = false
// グラフの方向(false: 上向き, true: 下向き)
.inverted = false
// 0からスタートする
.startAtZeroEnabled = true
// ?
.forceLabelsEnabled = false
// ?
labelWidth = CGFloat(1.0)
// ?
labelHeight = CGFloat(1.0)
// ?
labelRotatedWidth = CGFloat(1.0)
// ?
labelRotatedHeight = CGFloat(1.0)
// X軸のラベルの傾き度合い
labelRotationAngle = CGFloat(0.0)
// ?
.spaceBetweenLabels = Int(4)
// ?
.axisLabelModulus = Int(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment