【发布时间】:2016-10-04 12:55:51
【问题描述】:
我用来自 json 的数据制作了一个高库存图表。
我的问题是我只能在完全缩小时才能看到我的数据。 当我放大一周或一个月时,图表中的数据消失了。
我仍然可以在底部的导航器窗口中看到数据。
JSON:
[
[1475452800000, '10.69'],
[1475193600000, '10.86'],
[1475107200000, '10.69'],
[1475020800000, '10.91']
... (aprox a year)
]
Java:
$.getJSON('_json_stock.php?InfoHistory=<?php echo $G_CompanyStockSymbol;?>', function (data) {
// create the chart data: data,
$('#stockChartHistory').highcharts('StockChart', {
chart: {
zoomType: 'x'
},
xAxis: {
type: 'datetime'
},
credits: {
enabled: false
},
exporting: { enabled: false },
rangeSelector: {
buttons: [
{
type: 'day',
count: 1,
text: '1d'
}, {
type: 'month',
count: 1,
text: '1m'
},, {
type: 'month',
count: 3,
text: '3m'
},, {
type: 'month',
count: 6,
text: '6m'
}, {
type: 'year',
count: 1,
text: '1y'
}
],
selected: 2
},
series: [{
name: '<?php echo $G_CompanyStockSymbol;?>',
data: data,
tooltip: {
valueDecimals: 2
},
threshold: null
}]
});
});
【问题讨论】:
-
小提琴还是活生生的例子?
-
是的对不起:[link]kristjanwestberg.dk/stockvalue/test.php[/link]
标签: javascript php json highcharts highstock