Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickable bar chart example doesn't work #57

Closed
dtolj opened this issue Jun 22, 2012 · 10 comments
Closed

Clickable bar chart example doesn't work #57

dtolj opened this issue Jun 22, 2012 · 10 comments

Comments

@dtolj
Copy link

dtolj commented Jun 22, 2012

I get an error undefined method []=' for nil:NilClass`

on this line:

f.options[:plot_options][:column] = {:stacking=>'normal', 
              :cursor => 'pointer',
              :point => {:events => {:click => "function() {alert ('Chart loaded');"}}
           }  
@michelson
Copy link
Owner

are you triying this:
https://github.com/michelson/lazy_high_charts/wiki/Clickable-bar-chart ?

can you pastie your implementation please ?

Atte.
Miguel Michelson Martinez
www.artenlinea.com

On Fri, Jun 22, 2012 at 11:10 AM, Dejan Tolj <
reply@reply.github.com

wrote:

I get an error undefined method []=' for nil:NilClass`

on this line:

f.options[:plot_options][:column] = {:stacking=>'normal',
             :cursor => 'pointer',
             :point => {:events => {:click => "function() {alert ('Chart
loaded');"}}
          }

Reply to this email directly or view it on GitHub:
#57

@dtolj
Copy link
Author

dtolj commented Jun 22, 2012

Yes I am using the above link.
I have replaced js_function in controller to %|function() { window.location = "http://www.highcharts.com" }|.js_code

Now when I run it, I get undefined method js_code' for "function() { window.location = "http://www.highcharts.com\" }":String`

@michelson
Copy link
Owner

its difficult to debug it this way

can you pastie your implementation please ?

Atte.
Miguel Michelson Martinez
www.artenlinea.com

On Fri, Jun 22, 2012 at 12:34 PM, Dejan Tolj <
reply@reply.github.com

wrote:

Yes I am using the above link.
I have replaced js_function in controller to %|function() { window.location = "http://www.highcharts.com" }|.js_code

Now when I run it, I get undefined method js_code' for "function() {
window.location = "http://www.highcharts.com\" }":String`


Reply to this email directly or view it on GitHub:

#57 (comment)

@dtolj
Copy link
Author

dtolj commented Jun 22, 2012

Is this sufficient for you to debug? https://gist.github.com/2974143

@michelson
Copy link
Owner

no, i would like to see your implementation

@dtolj
Copy link
Author

dtolj commented Jun 25, 2012

ok, I have made a new rails 3.2 project to test this.

  1. added line to Gemfile: gem 'lazy_high_charts', '~> 1.1.5' and then bundle install
  2. rails g lazy_high_charts:install
  3. copy the controller and view code from here
  4. modified the first line in controller to @graph = LazyHighCharts::HighChart.new('column') do |f|
  5. run webrick server and I get this error: undefined method js_code' for "function() { window.location = "http://www.highcharts.com\" }":String`

@michelson
Copy link
Owner

Hi , could you try the example pointing the gem from my github repo ? @xiaods can you confirm this feature is in 1.1.5 gem ?

@xiaods
Copy link
Collaborator

xiaods commented Jun 25, 2012

hi, @dtolj gem have not support this feaure, you should use plugin instead. @michelson i have not know that how to set you as gem owner, so i will build new version for this feature asap.

@xiaods
Copy link
Collaborator

xiaods commented Jun 25, 2012

i have push new version lazy_high, please have a check ,thanks.

@michelson
Copy link
Owner

Thanks @xiaods , going to close this for now, @dtolj if you still have issues, reopen
cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants