我需要在數據值中添加逗號以顯示從123456到123,456。我試圖尋找許多論壇和支持,但我不明白我需要做什麼。如何在數據值中添加逗號
這是當前的腳本代碼:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('#container').highcharts({
chart: {
type: 'line',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Graph Title',
x: -20 //center
},
subtitle: {
text: 'Source: Name and site www.url.com',
x: -20
},
xAxis: {
categories: ['Jul-12', 'Aug-12', 'Sep-12', 'Oct-12', 'Nov-12', 'Dec-12',
'Jan-13', 'Feb-13', 'Mar-13', 'Apr-13']
},
yAxis: {
title: {
text: 'Price'
},
plotLines: [{
value: 0,
width: 1,
color: '#7c1440'
}]
},
tooltip: {
valueSuffix: ''
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{
name: 'HERC Index Value',
data: [230570, 231055, 231055, 232325, 232914, 241636, 241748, 241748, 242330, 242633]
}]
});
});
</script>
我所需要的「數據:」值顯示爲:數據:[230570,231055,231055,232325,232914,241636,241748,241748,242330 ,242,633]。
優秀!謝謝! – OtherDavid