How do I draw a second Y axis on the opposite side of the chart?

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Devin on 10th March 2017
Hello, I'm working on a multiple line chart and I need two y axes, one on each side of the chart, but I can't seem to find an example of this anywhere.

Below is a sort of illustration of what I'm trying to achieve:

y|___|y
    x

Here is the code I'm using (this is just for one line):

var line = new RGraph.Line({
             id: 'chart-container',
             data: [values1],
             options: {
                 backgroundGridBorder: true,
                 backgroundGridHlines: true,
                 colors: ['black'],
                 linewidth: 3,
                 hmargin: 0,
                 gutterLeft: 50,
                 gutterBottom: 50,
                 tickmarksStyle: 'circle',
                 tickmarksLinewidth: 1,
                 tickmarksSize: 7,
                 ylabels: true,
                 xlabels: false,
                 labels: labels,
                 xaxis: false,
                 yaxis: false,
                 yaxisDecimals: 0,
                 textAngle: 70
             }
         }).trace();
Posted by Richard on 11th March 2017
Hi there,

You can add an extra Y axis by using the drawing API Y axis?

www.rgraph.net/canvas/docs/drawing-api-yaxis.html




Richard

Add a reply




« Back to message list