0
I am facing a problem that I do not find the solution rs I need to add a line limit on my chart, I’m going to put an image down on how it is now and how it should look. Can you guide me on this?
google.charts.load('current', {'packages':['bar']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['2017', 'Minima', 'Máxima', 'Média'],
['Jan', 15, 23, 21],
['Fev', 17, 25, 20],
['Mar', 18, 30, 22],
['Abr', 20, 27, 27],
['Mai', 21, 23, 21],
['Jun', 23, 28, 26],
['Jul', 27, 32, 28],
['Ago', 22, 25, 24],
['Set', 26, 30, 28],
]);
var options = {
title: 'Relatório Temperatura Mensal',
colors: ['#cfcfcf', '#1c1c1c', '#828282'],
};
var chart = new google.charts.Bar(document.getElementById('columnchart_material'));
chart.draw(data, google.charts.Bar.convertOptions(options));
From now on. I thank you.
Do you want the media? Or do you not want the graphic to cross the red line?
– Geraldão de Rívia
Hey buddy, no, the average already got on a bar chart. What I need is a line set at a limit, for example, 23ºC, that line will stay fixed at this location always, so the bar charts will cross this "limit" and I will get some visualization in the report.
– Ítalo Salgado