以下にフロートグラフがあります。ラベルが凝縮されていることがわかります。すべてのラベルが表示されるように、目盛り間の幅を確保したいと考えています。マークアップは以下です。
<!-- Graph HTML -->
<div id="graph-wrapper">
<div class="graph-info">
<a href="#" id="bars"><span></span></a><a href="#" id="lines" class="active"><span></span>
</a>
</div>
<div class="graph-container">
<div id="graph-lines" style="width: 95%; height: 80%;">
</div>
<div id="graph-bars" style="width: 95%; height: 80%;">
</div>
</div>
<div id="series-check" class="graph-info bottom">
</div>
</div>
<!-- end Graph HTML -->
JS:
var ticks = [];
for (var i = 0; i < graphData[0].data.length; i++) {
ticks.push(graphData[0].data[i][0]);
}
$.plot($('#graph-lines'), graphData, {
series: {
points: {
show: true,
radius: 5
},
lines: {
show: true
},
shadowSize: 0
},
grid: {
color: '#646464',
borderColor: '#fff',
borderWidth: 20,
hoverable: true
},
xaxis: {
//tickColor: 'transparent',
//tickDecimals: 2,
mode: "time",
ticks: ticks,
timeformat: options["timformat"], // "%h:%M
min: new Date(options["GraphMinXValue"]), // min milliseconds from data
max: new Date(options["GraphMaxXValue"]) //max milliseconds from data
},
yaxis: {
min: 0,
show: true
},
pan: {
interactive: true
},
zoom: {
interactive: false
}
});
ウィンドウのサイズ変更でグラフのサイズを変更できるようにするには、グラフのパーセンテージが本当に必要ですが、グラフを自動的に大きくするための目盛りの間隔が必要です。含まれている div に overflow:hidden があり、パンを使用して、ユーザーが非表示のオーバーフローを表示できるようにします。これを修正する方法はありますか?