Can I change one of the bars into a line in a double Y chart?

15 views
Skip to first unread message

Rodrigo Manriquez

unread,
May 26, 2022, 2:56:45 PM5/26/22
to Google Visualization API

Good afternoon, I have a chart with double Y and I need to change some of the bars for lines, my code is as follows: Could someone guide me if this is possible and if it is how to do it?


function drawChartTodo() {
                        var data = google.visualization.arrayToDataTable(<%=obtenerDatos()%>);

                        var options = {
                            title: 'COSTO PRODUCCION',
                            series: {
                                0: { axis: 'Aserraderos' },
                                1: { axis: 'Aserraderos' },
                                2: { axis: 'Aserraderos' },
                                3: { axis: 'Producciones' },
                                4: { axis: 'Producciones' },
                                5: { axis: 'Producciones' },
                               
                            },
                            axes: {
                                y: {
                                    Aserraderos: { label: 'Costos' },
                                    Producciones: { side: 'right', label: 'Produccion'}
                                }
                            }
                        };
                        var chart = new google.charts.Bar(document.getElementById('columnchart_materialTodo'));
                        chart.draw(data, google.charts.Bar.convertOptions(options));
                    }



Reply all
Reply to author
Forward
0 new messages