X軸に時間を含むCanvas縦棒グラフを使用しています。
タイムチャートを更新していると、その時点のデータはありませんが、チャートに一定の時間間隔が表示されています。
これにより、チャート内に空き領域が生じ、右端に点が表示されます。
var liveData=[
{x:new Date( "Fri Jan 01 1960 " + "10:30:00" + " GMT+0530 (IST)"),
y: 20},
{x:new Date( "Fri Jan 01 1960 " + "10:35:00" + " GMT+0530 (IST)"),
y: 20},
{x:new Date( "Fri Jan 01 1960 " + "10:40:00" + " GMT+0530 (IST)"),
y: 20},
{x:new Date( "Fri Jan 01 1960 " + "11:40:00" + " GMT+0530 (IST)"),
y: 20}
]
var chart = new CanvasJS.Chart("chartContainer", {
width: 820,
hieght: 200,
title: {
text: "Live"
},
axisX: {
valueFormatString: "HH:mm:ss",
title: "Time",
gridColor: "white",
gridThickness: 0,
labelFontSize: 13
},
axisY: {
title: "Units"
},
dataPointMaxWidth: 20,
data: [{
// color: "#B0D0B0",
toolTipContent: "Time: {x} <br> Opens: <strong>{y} </strong>",
color: "#452323",
type: "column",
dataPoints: liveData
},
]
});
chart.render(); http://jsfiddle.net/1ekxfh2w/
データがある場所だけ時間を表示したい。どうすればこれを達成できますか??
または、私のために仕事をすることができる他のチャート??