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 sankey draggable nodes
- Highcharts plot in fancybox
- highcharts scatter change point color
- Highcharts. Make tooltip of a specific point always visible
- Highstock Make a conditional tooltip
- ColorAxis with HighChart not working as expected with different set of library
- Adding Maplines in HighMaps using geojson file
- Embedding the view of a url inside the header of another view
- Capture right click on column/bar
- Rails Highcharts Heatmap
- Display Data with Xvalues correctly in Highcharts
- Multiple X-axis values in highcharts
- Pie chart: image exporting cutting off labels
- How to change text color of bubble on Highmap on select state?
- HeatMap with custom colors for each cell
- Populate JSON object to highchart bar chart
- loop list of Javascript Objects to render Highcharts
- Highcharts - Xrange chart events issue
- Changing xDateFormat in highchart tooltip programatically
- Highcharts: displaying datetime like categories
- Real time chars using highcharts, JSON, REST and Spring MVC
- Http call from a service inside a directive controller
- trouble plotting multiple series of data on highstock
- Highchart's gauge with gradient plotband
- To create a list with multiple list inside it
- UseHTML property in XAxisTitle or YAxisTitle
- The data is not rendered in highcharts
- Set zero for missing data in highcharts
- How to add separate annotation style tooltip for Highcharts marker?
- HighCharts - Horizontal line with the zoomed average of the values