Set data item delimiter and line delimiter
Description
The following code shows how to set data item delimiter and line delimiter.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--from ww w .ja v a 2s .c o m-->
$('#container').highcharts({
data: {
csv: document.getElementById('csv').innerHTML,
itemDelimiter: ':',
lineDelimiter: ';'
}
});
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/data.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px"></div>
<pre id="csv" style="display:none">Date:Grade;
25 May:5;
25 May:7;
15 July:8;
15 April:2;</pre>
</body>
</html>