代码示例:(标识:ai_google_chart_line)
<!DOCTYPE html>
<html>
<script type="text/javascript" src="/static/demo/html/js/loader.js"></script>
<body>
<div id="myChart" style="width:100%; max-width:600px; height:500px;"></div>

<script>
google.charts.load('current',{packages:['corechart']});
google.charts.setOnLoadCallback(drawChart);

function drawChart() {
// 设置数据
var data = google.visualization.arrayToDataTable([
  ['Price', 'Size'],
  [50,7],[60,8],[70,8],[80,9],[90,9],
  [100,9],[110,10],[120,11],
  [130,14],[140,14],[150,15]
]);
// 设置选项
var options = {
  title: '房价与房屋面积',
  hAxis: {title: '平方米'},
  vAxis: {title: '价格(百万元)'},
  legend: 'none'
};
// 绘制图表
var chart = new google.visualization.LineChart(document.getElementById('myChart'));
chart.draw(data, options);
}
</script>

</body>
</html>
运行结果: