score:0
Accepted answer
i had problems fetching updated data from my controllers to populate my highcharts data. instead of using gon, which kept returning stale data, i switched to json. works like a charm now.
score:1
use lazy-high-chart to save your time!
https://github.com/michelson/lazy_high_charts
e.g. in controller,
@h = lazyhighcharts::highchart.new('graph') do |f|
f.options[:chart][:defaultseriestype] = "area"
f.series(:name=>'john', :data=>[3, 20, 3, 5, 4, 10, 12 ,3, 5,6,7,7,80,9,9])
f.series(:name=>'jane', :data=> [1, 3, 4, 3, 3, 5, 4,-46,7,8,8,9,9,0,0,9] )
end
in view,
<%= high_chart("my_id", @h) %>
Source: stackoverflow.com
Related Query
- Updating highcharts using ajax for Rails
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Rails generates chart for .each do |x| using highcharts or any other chart API
- Highcharts display label for pie chart using html table as data source
- HTML table as data source for highstock charts using highcharts
- Using a flask variable as data source for highcharts
- dynamically generating json from json for highcharts heap map chart using ajax
- Using highcharts for Rails (via LazyHighCharts), is there a tooltip for yDateFormat for having datetime data on the Yaxis?
- Rails - convert date string into javascript date object for highcharts
- getting error#17 from highcharts while using solid gauge from backbone rails
- create a sticky tooltip for a point or a permanent label using HighCharts
- Formatting JSON data monthwise for HighCharts using MySQL
- Rails ActiveRecord group_by & sum db results for use with Lazy HighCharts
- Using highcharts with rails not displaying plotLines
- Query rails database, and update highcharts using Javascript
- Updating Highcharts realtime using Socket.io
- AngularJS for Highcharts with dynamic ajax data
- Charts on rails 3 using highcharts
- highcharts display in my render html page which i want to convert into PDF using wkhtmltopdf in rails
- Passing in Id for each data item in bar chart using highcharts
- Best performance for updating many Highcharts instances on demand
- Highcharts - update chart using ajax
- Using connecting legends for two Highcharts pie charts
- Use ajax to draw graph dynamically using Highcharts
- Return Highcharts using Ajax and Python
- Load CSV data via Ajax for display in Highcharts
- Using Highcharts with mysql for Page Visits
- Using HighCharts setData for multiple variables?
- How to include highcharts motion plugin for bubble plot using R wrapper?
- highcharts example for using data from database with mvc
More Query from same tag
- Reset / Set ZoomType Control in Highstock
- Highmaps : dataLabels console error
- Change plotBands options after chart creation
- Use Highcharts-ng with JSON
- How to apply colorAxis.stops with heatmap in Jaspersoft Studio 6.0.1?
- Highcharts column category in X-axis using different Y-axis
- highchartjs do not show time on tooltip
- When does angular2 @output resolve?
- Place text in center of pie chart - Highcharts
- Change highstock chart zones on click yAxis
- highcharts: bar/column chart with drilldown
- Automatically plot accumulated data
- Highcharts/Stockcharts - display absolute value within 100%
- Change Datalabel Color, Rotation and Align values based on Column value in highcharts
- How automatic xAxis labels rotation in highchart
- How to get access to the chart from HighchartsReact component to ResponsiveGridLayout component when I'm using functional react component
- How to shrink space between numbers on y-axis in HighCharts
- Highcharts copy HTML of chart can't disable cursor change
- Highcharts / Highstock datetime null data connected even with connectNulls: false
- Highcharts show / highlight y-Axis on mouseover over chart line
- how to update bar graph and also its legend without re-drawing it in highcharts
- Issues with custom border around Highcharts Stacked Bars and disabling hover effect
- Highcharts data set array
- How to apply borderRadius only for top side of Column or Bar in Highchart
- How to format column chart data labels
- How do I use Highcharts to display candlestick with small values?
- Pass Data String as parameter to a Function for HighCharts
- Highcarts Space between number If the value is exceed 1K
- How to set individual colors for high chart pies
- Highchart multiple threshold colors