Google chart series 3 is plotting against hAxis:0 to vAxis:1

11 views
Skip to first unread message

Girigouda RS

unread,
Oct 18, 2018, 4:42:19 PM10/18/18
to Google Visualization API
Hi There,

I have plotted the google line chart, which has 3 series with multi axis graph. When I add the 3rd series which need draw only one point again hAxis:0 to vAxis:0. 

But its plotting against hAxis:0 to vAxis:1. 

Please fine the data and chart as below.

function drawChart() {
            var data = google.visualization.arrayToDataTable([
                ['Flow', 'Head', 'Efficiency', 'Point'],
                [0, 92.1165, 0, null],
                [71.0783, 90.0421, 50, null],
                [106.6014, 87.8718, 60, null],
                [139.0220, 83.2687, 65, null],
                [158.8823, 79.4878, 65.9, null],
                [172.5161, 75.8211, 65, null],
                [203.9705, 64.874, 60, null],
                [231.8823, 53.5638, 50, null],
                [234.0294, 52.5841, 49.1, null],
                [100, null, null, 85]
            ]);

            var options = {
                title: 'Lewis Pump Curve',
                curveType: 'function',
                legend: { position: 'bottom' },
                series: {
                    0: { targetAxisIndex: 0 },
                    1: { targetAxisIndex: 1 },
                    2: { targetAxisIndex: 1 },
                    3: { targetAxisIndex: 3, type: 'Scatter' }
                },
                vAxes: {
                    0: { logScale: false, title: 'Head' },
                    1: {
                        logScale: false, title: 'Efficiency'
                    }
                },
                hAxis: {
                    title: 'Flow'
                },
                pointSize: 5
            };


The Chart is as below


GoogleChart.PNG
Reply all
Reply to author
Forward
0 new messages