Reputation: 8423
I am trying to make the labels on the x-axis two lined but its cut off. Here is my code
<!DOCTYPE html >
<html>
<head>
<script src="RGraph.common.core.js" ></script>
<script src="RGraph.line.js" ></script>
</head>
<body>
<canvas id="cvs" width="320" height="320">[No canvas support]</canvas>
<script>
window.onload = function ()
{
var line = new RGraph.Line('cvs', [0,52,90,86,86,75,75,75,75,75,60,60,60,60,60,60,100,95,53,53]);
line.Set('chart.labels',['10/05\n21:00','11/05\n08:00','11/05\n20:00','12/05\n08:00','12/05\n20:00']);
line.Draw();
}
</script>
</body>
</html>
This is how it looks like
I already played around with the canvas height but it does not change it.
Upvotes: 1
Views: 1905
Reputation: 5101
Increase the chart.gutter.bottom setting. It defaults to 25 - so set it to 35 or 40.
Upvotes: 2