indents the time automatically, merges more than one
how to release the manual several times, but doesn"t find trouble, ha
$.getJSON("__MODULE__/Point/kline2/product/"+this.nowproduct_no+"/min/"+this.kline, function (data) {
if(data.code !== 1) {
alert("");
return false;
}
data = data.data;
var ohlc = [],
volume = [],
dataLength = data.length,
// set the allowed units for data grouping
groupingUnits = [[
"week", // unit name
[1] // allowed multiples
], [
"month",
[1, 2, 3, 4, 6]
]],
i = 0;
for (i; i < dataLength; i += 1) {
ohlc.push([
data[i][0], // the date
data[i][1], // open
data[i][2], // high
data[i][3], // low
data[i][4] // close
]);
volume.push([
data[i][0], // the date
]);
}
// create the chart
var chart = Highcharts.stockChart("container2", {
credits:{
//
enabled:false,
},
exporting:{
//
enabled:false,
},
rangeSelector: {
enabled:false,
selected: 1,
inputDateFormat: "%Y-%m-%d"
},
title: {
text: null
},
xAxis: {
dateTimeLabelFormats: {
millisecond: "%H:%M:%S.%L",
second: "%H:%M:%S",
minute: "%H:%M",
hour: "%H:%M",
day: "%m-%d",
week: "%m-%d",
month: "%y-%m",
year: "%Y"
}
},
tooltip: {
split: false,
shared: true,
},
/**/
navigator:{
enabled: false
},
/**/
scrollbar: {
enabled: false
},
yAxis: [{
labels: {
align: "right",
x: -3
},
title: {
text: null
},
height: "100%",
resize: {
enabled: true
},
lineWidth: 2
}, ],
series: [{
type: "candlestick",
name: "",
color: "green",
lineColor: "green",
upColor: "red",
upLineColor: "red",
tooltip: {
},
navigatorOptions: {
color: Highcharts.getOptions().colors[0]
},
data: ohlc,
// dataGrouping: {
// units: groupingUnits
// },
id: "sz"
}]
});
});
{/* K end */}