score:2
Accepted answer
Not exactly sure what you're trying to do, but it appears like you just need to change this
this.category == <%= @show_me %>;
to this
this.category = "<%= @show_me %>";
Although you should be aware that anything with the <%= %>
tags is prerendered before the page is loaded.
Update:
Looks like what you're trying to do might involve some AJAX. You might consider looking through this tutorial since this is a semi-complicated topic, and can be confusing if you have no experience with it.
Source: stackoverflow.com
Related Query
- On click, passing a variable from Javascript into Rails/Ruby
- Passing data from db into Highcharts in Rails 3.x
- Passing data to highcharts from javascript array or variable
- How can I unescape and remove quot; from data served by rails into javascript
- Use django variable (array of elements from sqlite3 database) inside javascript embedded code
- Rails - convert date string into javascript date object for highcharts
- Passing a JavaScript function from JSON encoded PHP
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- Getting data from Postgres in JSON format in ROR into a Highcharts javascript
- passing json values to highcharts from .net code behind
- passing formatting JavaScript code to HighCharts with JSON
- Javascript: Plotting data from a variable using HighCharts- no data passing
- Plot Highcharts data from past 30 days with Ruby on Rails
- Highcharts Using Data from Ruby on Rails Database
- Passing data from Javascript MVC controller
- Passing Returned Data from a PHP Script into a Highcharts data[] block?
- Unable to use solid-gauge highchart in backboneJS from ruby on rails
- Passing variable into highcharts solid gauge
- from Javascript to Python on click
- Rails can't find javascript file from gem
- multiple Drilldown in Highcharts using values from database in ruby on rails
- How to disable legend click to stop pie slice from disappearing in Highcharts?
- highcharts: stop chart from trapping mouse events, or capture mouse click on the ENTIRE chart
- Optimize JavaScript DrillDown code
- Convert from string with milliseconds to date object Javascript
- Customizing the Stockchart range selector buttons from HighCharts library in GWT (and Javascript in general)
- Highcharts how to use JavaScript variable as series data source?
- getting error#17 from highcharts while using solid gauge from backbone rails
- Converting svg from Highcharts data into data points
- How to pass custom data into Highcharts graph click event
More Query from same tag
- Highstock export csv based on data grouping
- Highcharts v6.0.0 Annotations Not Working
- How to prevent bars overlapping eachother in Highcharts?
- Replace data set every min
- Highchart Legend labelFormatter not working properly
- Append to default highcharts tooltip
- Exporting several HighCharts graphs to Powerpoint slides
- Highcharts: Make the Axis continue to current datetime
- How to pinPoint highchart grouped barchart variables
- Implement chartit in Django 1.6 with Python 2.7 : TypeError: 'NoneType' has no attribute __getitem__ - Need more information
- unable to display json data on highcharts
- React-highcharts: I have "renderer" problem and I need a way to update "state" upon function call
- Highcharts thinks all dates are 1970-01-01, despite them being valid epoch times
- Highcharts and phantomjs error. Can't find variable Highcharts
- Multiple labels in Highcharts Pie Graph
- Highchart multiply data in tooltip
- Highcharts Stacked bar chart with db value (Dynamic Data)
- How to open chart in new tab?
- How to customize tooltip styling in for Scatter plot in Highchart?
- How to draw following graph using Scatter Plot highchart?
- Ploting pie chart in django by highcharts
- How do I make a fixed range?
- Highchart Duplicate X-Axis and Y-Axis Labels
- HighCharts: Panning in yAxis is happening too slowly
- jsPDF - Getting black images on IE, but works fine on Chrome and FireFox
- How to draw on charts?
- Highstock Options in Yii Booster Highcharts
- Select cell value from table
- Is it possible to plot more than 35000 points in Highcharts
- Changing behavior of pie chart on clik on item legend