score:2
Accepted answer
I don't know if it's the best practice, but you can store dates in an array and temperatures in an other one like this :
# Considering you already stored your data, you need to parse it now
data = JSON.parse(your_data)
# Initialize your two arrays
@dates = Array.new
@temperatures = Array.new
# Fill your two arrays
data["data"].each do |d|
@dates.push(d.keys)
@temperatures.push(d.values.to_i) # Need to be a number to work with .series of HightCharts
end
Now you have the @dates
array which contains all your dates and @temperatures
array which contains all your temperatures.
Hope this help !
Source: stackoverflow.com
Related Query
- JSON data from URL
- Highchart graph retrieve data from json url
- How to set json data from url on highchart and polling the json data after 1 sec to dislay on highchart using Angular js
- Highcharts displays series names but missing data points from json source
- Send JSON data to highcharts pie from asp.net MVC controller in C#
- Highcharts: How to load data from JSON to xAxis.categories and series.data?
- get json data from my controller in highcharts.js
- Highcharts bargraph from json data in angularJS
- Formatting JSON from a Pandas data frame for Highcharts within a Django template
- How to make Highcharts fetch data from external JSON file?
- Place Data in Highchart using json and post url
- How to load data from JSON to Highchart?
- Extracting data from a JSON call to a Postgres table for use in Highcharts (without PHP)
- Getting data from Postgres in JSON format in ROR into a Highcharts javascript
- passing json values to highcharts from .net code behind
- Highcharts polar chart wind rose data from JSON
- How to fetch JSON data from HTML DIV on same page for Highcharts?
- Issue with JSON data encoded from the server, not able to plot the chart
- How to get the last 10 objects only from JSON data
- How to create seriesfor Highcharts from JSON data to use
- Getting Data from PHP, JSON Highcharts?
- Tooltip in highmaps is not working .Unable to show the data from the json onto the highmap
- Highcharts chart dynamic json data from sql
- Getting data from a JSON result in to a chart (Highcharts)
- Extract data series from a JSON array for a Highcharts chart with 2 y-axis
- Generating json data for StockChart from PHP
- How do I get data from a RESTful API JSON response in React?
- Plotting Highcharts Chart from multiple data points in json
- Highcharts combination chart from JSON data
- How filter json data with date from datepicker Angular2 app
More Query from same tag
- Check if all legend items are selected in highcharts?
- Highchart jquery charts not working SetAttribute is not a function
- Adding space between Navigation bar and legend in pie chart(highcharts)
- Different Array(s) in Chrome Dev Tools
- Would it be possible to make two columns which belong to different series respectively to be placed exactly on the tick on x-axis with highchart?
- use highmaps in .vue file
- highchart - label color by based on point data
- How to make xAxis on bar chart match pointWidth
- How can I get Highstock tooltip to animate like Highcharts?
- Flags placement on x-Axis on dual pane chart
- Pass data to click event callback in Highstock chart with more then 1000 entries
- Add new axis dynamically when adding series from indicators/stocktools
- Sync max min between many highcharts charts (in real time)
- highcharts categories issues
- Adding images to top of each column for each group on a chart
- Highcharts - Indicator's data not showing in line chart
- Add the average line of a serie to a chart
- Renaming items in export menu in highcharts
- How to add an item to Highcharts legend?
- Display series.data.name after drilldown dynamically
- How to create highlight area under curve in high chart?
- Same Highchart in different tabs not loading - Only first Tab loading
- Highcharts > Tooltip > Crosshair: How to set horizontal crosshair to snap to CLOSE in OHLC series?
- Newline axis labels exporting to SVG
- Threshold value change on click of rangeSelector in HighStock graph
- Highcharts: Difference between onMouseOver vs onContainerPointerMove?
- Cannot implement lazy high chart receiving errors
- Highcharts - XAxis Label with LineFeed - how to make smaller gap?
- Receiving incorrect datetimes when using milliseconds for x-axis?
- Highchart series update in javascript