score:15
try this:
data: json.parse("[" + myjstring + "]")
basically this formats the string's contents as a json array. the parse
function then de-serializes the string into a javascript array.
score:1
another easy approach is using the javascript string.split() function, thus.
series: [{ name: 'series1', data: myjstring.split(', ') }]
if you're not sure whether you'll have a space after the comma or not, use regex.
series: [{ name: 'series1', data: myjstring.split(/,[\d]*/) }]
score:6
since data is a array type, you can use arrays for the values like
mydata = [4.5, 3.1, 6.5, 7.0, -1.3];
Source: stackoverflow.com
Related Query
- Highcharts how to use JavaScript variable as series data source?
- how to use javascript variable for complete series data
- Highcharts not working when pass the javascript variable as hightcharts series data
- How to have multiple highcharts with different series data in vuejs without repeating code
- How to use a javascript variable in highcharts series?
- Add additional data to a Highcharts series for use in formatters
- How do I dynamically change a data point in Highcharts using JavaScript
- How To Use Epoch Time With Highcharts Series Data?
- Use an array of objects for series data in Highcharts
- How to get multiple data series into Highcharts
- How to hide one series data info in tooltip using highcharts
- Highcharts - how to create multiple y axis and group the data series
- how to use object as series for Highcharts
- Passing data to highcharts from javascript array or variable
- How to construct HighCharts data series to match returned Json via ajax call
- how to use highcharts tooltip formatter in python code
- How to create seriesfor Highcharts from JSON data to use
- How to add Series data in Highcharts from MVC
- How to use data in rChart Highcharts
- how to continue the graph line when missing series of data in middle of highcharts
- HighCharts how to add live series data set to existing chart
- How to hide data in a series in highcharts boxplot?
- How to use highcharts in reactjs with fetched data from API
- How to use json data as highcharts Pie Chart?
- How to reference a data point (or points) in another series in highcharts
- How to use axios to fetch data from servlet and then crossfilter it and display via highcharts
- Highcharts series visibility with csv data source
- Highchart not able to use javascript variables(arrays) in series data
- How can i use dynamic data on a Highcharts chart?
- How can I change data series dynamically in HighCharts without overwriting initial series?
More Query from same tag
- Highcharts: significant decimals in the tooltip
- Highcharts Error #18 in - Highcharts.Chart(options)
- display content on highcharts Xaxis and Yaxis title in form of subscript and superscript
- Is it possible to use null datapoints with a datetime x-axis?
- Highcharts Align HTML Right when Window Resized
- How I can change the axis both side in y axis?
- Highmaps support for zip5
- Highcharts - Bubblechart - adding padding to top and bottom of plot
- How to use dblclick event in highcharts?
- Feeding highchart with x and y values from ajax
- put condition depending on the value HIGHCHARTS
- Highcharts datetime label for column
- Anything other than 'bar' chart breaks highcharts.js
- Chart series point added not sync with X axis
- In highcharts how can I provide data with values x, y, title so that I can put the title in the tooltip?
- Gradle sync failed. Basic functionality will not work properly
- Highchartjs doesn't render properly with the data
- Highcharts Server side generation not working on windows 2008 server
- Highchart autoscalling
- Highcharts drill-down using table element as data-source
- Highcharts adding integer instead of date
- using flask render_template to make a highchart on the front end
- Highcharts - Continuous line with centered step (start before the first point)
- Highcharts: Marker radius does not seem to work
- Highcharts heatmap - disabling the legend results in different colors
- Show x-Axis line but hide all data points
- Not able to getting highcharts legend label in order
- Assigning series data to highchart using Java ArrayList
- How can I remove the white border from HighCharts pie chart?
- MultiAxis HighChart: show different color