I have data in format [[x1, y1], [x2, y2],..].
x values are from 1 to 31. It respresents days in month.
y values are temperature for these days.
When I plot these data with jqPlot, I get this:

Here is code:
$.post('php/database2json.php', function(data) {
var options = {
title: 'Месечна температура',
series: [
{ label: 'Ниш'}
],
axes:{
xaxis:{
label:'Дани',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
yaxis:{
label:'Температура',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
},
legend: {
show: $legenda
},
highlighter: {
show: $hover
},
cursor:{
show: $zoom,
zoom: $zoom,
false)
showTooltip: true
}
};
$('#placeholder').empty();
var plot1 = $.jqplot ('placeholder', [data], options);
},
'json'
);
How to make short this chart, to fit line?
EDIT: I get json array from post:
[[“1″,”-1″],[“2″,”0”],[“3″,”0”],[“4″,”0”],[“5″,”4”],[“6″,”5”],[“7″,”3”],[“8″,”2”],[“9″,”2”],[“10″,”1”],[“11″,”-2″],[“12″,”-2″],[“13″,”0”],[“14″,”1”],[“15″,”-2″],[“16″,”-1″],[“17″,”-1″],[“18″,”-2″],[“19″,”-1″],[“20″,”3”],[“21″,”-1″],[“22″,”0”],[“23″,”1”],[“24″,”3”],[“25″,”1”],[“26″,”1”],[“27″,”-1″],[“28″,”-1″],[“29″,”4”],[“30″,”5”],[“31″,”5”]]
Your array values are strings. They should be numeric values. Modify your PHP script to return numeric (int or float) point pairs. Once you do that your plot will scale properly: