对不起,如果我的问题已经解决了。
以下是Highcharts示例:JsFiddle
正如您所看到的那样,xaxys是按比例的......有没有办法让所有列都居中,并且彼此之间的距离相同,无论日期时间如何?
var categoriesGrafico = [1417388400000, 1418511600000, 1418598000000, 1419894000000 ];
var seriesGrafico = [
{
"name": "605392037434",
"data": [
{
"name": "D140088572",
"x": 1417388400000,
"y": 55.21
},
{
"name": "D140088572",
"x": 1418511600000,
"y": 55.21
},
{
"name": "D140088572",
"x": 1418598000000,
"y": 55.21
},
{
"name": "D140088572",
"x": 1419894000000,
"y": 55.21
}
],
"_colorIndex": 0
}
];
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},title: {
text: 'title'
},plotOptions: {
column: {
stacking: 'normal',
minPointLength: 2
}
},xAxis: {
type: 'datetime',
title: {
text: 'date'
},
tickPositions: categoriesGrafico,
labels:{
rotation: -90,
formatter:function(){
return Highcharts.dateFormat('%d/%m/%Y',this.value);
}
},
reversed: true,
dateTimeLabelFormats: {
day: '%d/%m/%Y',
}
},yAxis: {
title: {
text: 'value'
},
min: 0
},
series: seriesGrafico
});
});
一种类别或线性图......
提前谢谢。
答案 0 :(得分:1)
您可以在ordinal
中使用HighStock的xAxis
值。但是,这可能意味着如果您尚未支付HighStock并且只支付HighCharts付款,则必须获得额外的许可证 - refer here