Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added configuration option for y-axis labels

  • Loading branch information...
commit 3ae0b79f562b51f5a51f682ab280b904b4528510 1 parent fc7c6b9
@toamitkumar authored
View
13 lib/motion-plot/chart/base.rb
@@ -116,6 +116,19 @@ def initWithOptions(options, containerView:container)
axis = @axes[:y]
add_axis_title(@yaxis, axis.title)
+
+ if(axis.labels)
+ labels = axis.labels.each_with_index.map do |l, i|
+ @yaxis.labelingPolicy = CPTAxisLabelingPolicyNone
+ label = CPTAxisLabel.alloc.initWithText(l, textStyle: axis.text_style)
+ label.tickLocation = CPTDecimalFromInt(i)
+ label.offset = 3.0
+ label
+ end
+
+ @yaxis.axisLabels = NSSet.setWithArray(labels)
+ end
+
@yaxis.setLabelTextStyle(axis.text_style)
end
View
2  lib/motion-plot/version.rb
@@ -1,3 +1,3 @@
module MotionPlot
- VERSION = "0.4.7"
+ VERSION = "0.4.8"
end
View
4 motion-plot.gemspec
@@ -4,8 +4,8 @@ require File.expand_path('../lib/motion-plot/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Amit Kumar"]
gem.email = ["toamitkumar@gmail.com"]
- gem.description = "Build native charts as you are used with Highcharts/D3. This library is a wrapper on top of CorePlot"
- gem.summary = "Build native charts as you are used with Highcharts/D3. This library is a wrapper on top of CorePlot"
+ gem.description = "Create native iOS charts using simple JSON as you are used-to with Highcharts like JS library. This library is a wrapper on top of CorePlot"
+ gem.summary = "Create native iOS charts using simple JSON as you are used-to with Highcharts like JS library. This library is a wrapper on top of CorePlot"
gem.homepage = ""
gem.files = `git ls-files`.split("\n").delete_if {|x| x.include? "examples"}
Please sign in to comment.
Something went wrong with that request. Please try again.