I am not able to view the labels for plots in the graph - Only when X-axis co-ordinates are Date values
it works fine if I give x axis value as String - data: [['A',parseInt(1)],['B',parseInt(2)]],
it doesnt work fine for data: [[new Date(2011,12,11),parseInt(1)],[new Date(2011,12,12),parseInt(2)]],
Below is the code am using
$('#vital-signs-graph').jqChart({
axes: [x1,yresp],
series: [aresp]
});
function getXaxis(){
var x1={type: 'line',
location: 'bottom',
type: 'dateTime',
intervalType: 'hours',
labels : {
stringFormat : 'mm/dd HH',
angle: -90
},
interval : 1,
name: 'xhour',
title: { text: 'Hour', font: '10px sans-serif' }
};
return x1;
}
function getYresp(){
var yresp=
{
name: 'yresp',
location: 'left',
strokeStyle: '#0066FF',
title: { text: 'Resp.Rate', font: '10px sans-serif' }
};
return yresp;
}
function getRespPlot(baseresp){
var aresp=
{
id: 'iresp',
type: 'line',
title: 'Respiratory Rate',
axisY: 'yresp',
axisX: 'xhour',
data: [[new Date(2011,12,12),parseInt(1)],[new Date(2011,12,12),parseInt(2)]],
labels:
{
font: '11px sans-serif',
fillStyle: 'red'
}
};
return aresp;