0

Is there any option which allows me to change x-axis labels position? As you can see on attached screen it is overlaping the chart area.

rgraph chart

I am trying to use labelsOffsety but it is doesn't work. Maybe I'm doing something wrong?

<script src="jquery.min.js"></script>

<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.key.js"></script>
<script src="RGraph.line.js"></script>
<script src="RGraph.bar.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.common.tooltips.js"></script>

<center>
    <canvas id="cvs" width="1000" height="600">[No canvas support]</canvas>
</center>

<script>
    var data = [
        [1,1,2,3,5,8,13,21,34]
    ];

    var line = new RGraph.Line({
        id: 'cvs',
        data: data,
        options: {
            colors: ['blue'],
            linewidth: 4,
            hmargin: 5,
            vmargin: 50,
            shadow: false,
            'text.angle': 45,
            tickmarks: 'filledcircle',
            ticksize: 2,
            'text.color': 'green',
            labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'],
            tooltips: ['1','1','2','3','5','8','13','21','34'],
            'gutter.bottom': 50,
            'gutter.top': 50,
            'gutter.left': 50,
            'labels.above': true,
            'ylabels': true,
            labelsOffsety: 20 
        }
    }).draw();
</script>
Rudobrody
  • 1
  • 2

1 Answers1

0

If you're using the canvas libraries you can use the labelsOffsety option.

Richard
  • 4,809
  • 3
  • 27
  • 46
  • Thanks for the answer. I tried to use labelsOffsety but it does't work. I put a code. Could you please take a a look and correct me? – Rudobrody May 24 '17 at 15:48
  • The code that you posted works fine - is it the right code? It's a line chart and the image in your question is a Bar chart. – Richard May 24 '17 at 19:01
  • I have created new chart to test labelsOffsety but there is no effect when I am changing value for this parameter :( – Rudobrody May 25 '17 at 09:50