Skip to content

Commit

Permalink
Fixed JavaScript formatting in docs - closes #212
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 10, 2016
1 parent abf33bf commit 8a27b86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
@@ -1,6 +1,6 @@
# Chartkick # Chartkick


Create beautiful Javascript charts with one line of Ruby. No more fighting with charting libraries! Create beautiful JavaScript charts with one line of Ruby. No more fighting with charting libraries!


[See it in action](http://ankane.github.io/chartkick/) [See it in action](http://ankane.github.io/chartkick/)


Expand Down Expand Up @@ -169,7 +169,7 @@ Customize the html
Chartkick.options[:html] = '<div id="%{id}" style="height: %{height};">Loading...</div>' Chartkick.options[:html] = '<div id="%{id}" style="height: %{height};">Loading...</div>'
``` ```


You capture the javascript in a content block with: You capture the JavaScript in a content block with:


```ruby ```ruby
Chartkick.options[:content_for] = :charts_js Chartkick.options[:content_for] = :charts_js
Expand All @@ -182,7 +182,7 @@ Then, in your layout:
<%= yield_content :charts_js %> <%# Padrino %> <%= yield_content :charts_js %> <%# Padrino %>
``` ```


This is great for including all of your javascript at the bottom of the page. This is great for including all of your JavaScript at the bottom of the page.


### Data ### Data


Expand Down Expand Up @@ -216,7 +216,7 @@ Add this line to your application's Gemfile:
gem "chartkick" gem "chartkick"
``` ```


And add the javascript files to your views. These files must be included **before** the helper methods, unless using the `:content_for` option. And add the JavaScript files to your views. These files must be included **before** the helper methods, unless using the `:content_for` option.


For Google Charts, use: For Google Charts, use:


Expand Down Expand Up @@ -273,7 +273,7 @@ To specify a language for Google Charts, add:
</script> </script>
``` ```


**before** the javascript files. **before** the JavaScript files.


## No Ruby? No Problem ## No Ruby? No Problem


Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/chartkick.js
@@ -1,6 +1,6 @@
/* /*
* Chartkick.js * Chartkick.js
* Create beautiful Javascript charts with minimal code * Create beautiful JavaScript charts with minimal code
* https://github.com/ankane/chartkick.js * https://github.com/ankane/chartkick.js
* v1.4.1 * v1.4.1
* MIT License * MIT License
Expand Down
4 changes: 2 additions & 2 deletions chartkick.gemspec
Expand Up @@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
spec.version = Chartkick::VERSION spec.version = Chartkick::VERSION
spec.authors = ["Andrew Kane"] spec.authors = ["Andrew Kane"]
spec.email = ["acekane1@gmail.com"] spec.email = ["acekane1@gmail.com"]
spec.description = "Create beautiful Javascript charts with one line of Ruby" spec.description = "Create beautiful JavaScript charts with one line of Ruby"
spec.summary = "Create beautiful Javascript charts with one line of Ruby" spec.summary = "Create beautiful JavaScript charts with one line of Ruby"
spec.homepage = "http://chartkick.com" spec.homepage = "http://chartkick.com"
spec.license = "MIT" spec.license = "MIT"


Expand Down

0 comments on commit 8a27b86

Please sign in to comment.