# Google Charts - Polynomial Trendlines Chart

You are Here:

## How to Draw a Polynomial Trendlines Chart?

In this example, we will draw a polynomial trendlines chart. Please hover the trendlines/points in the above chart to view particular details.

### Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://www.gstatic.com/charts/loader.js"></script> </head> <body> <div id="point"> </div> <script> google.charts.load('current', {packages: ['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Diameter', 'Age'], [8, 37], [4, 19.5], [21, 52], [4, 22], [3, 16.5], [6.5, 32.8], [14, 72] ]); var options = { title: 'Age of sugar maples vs. trunk diameter, in inches', height: 400, pointShape: 'diamond', hAxis: { title: 'Diameter' }, vAxis: { title: 'Age' }, legend: 'none', trendlines: { 0: { type: 'polynomial', degree: 3, visibleInLegend: true, pointSize: 20 // Set the size of the trendline dots. } } }; var chart = new google.visualization.ScatterChart(document.getElementById('point')); chart.draw(data, options); } </script> </body> </html>

## Reminder

Hi Developers, we almost covered 98% of Google Charts Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Google Charts.