Google Charts Tutorial

Google Charts Home

Google Charts Area

Basic Area ChartNegative Area ChartStacked Area ChartPercentage Area ChartMissing Points Area ChartInverted Area Chart

Google Charts Bar

Basic Bar ChartCustomized Bar ChartLabeled Bar ChartGrouped Bar ChartAnnotation Bar ChartStacked Bar ChartNegative Stacked Bar ChartPercentage Stacked Bar ChartMaterial Bar ChartDual X-axes Bar ChartRight Y-axis Bar ChartCustomized Axis and Tick Labels

Google Charts Bubble

Basic Bubble ChartLabeled Bubble ChartCustomized Labels Bubble Chart

Google Charts Calendar

Basic Calendar ChartCustomized Days Calendar ChartCustomized Weeks Calendar ChartCustomized Months Calendar ChartCustomized Years Calendar ChartCustomized Size Calendar ChartCustomized Cell Calendar ChartCustomized Focused CellCustomized noDataPattern

Google Charts Candlestick

Basic Candlestick chartCustomized Color Candlestick

Google Charts Column

Basic Column ChartCustomized Column ChartLabeled Column ChartGrouped Column ChartAnnotation Column ChartStacked Column ChartNegative Stacked Column chartPercentage Stacked Column ChartMaterial Column ChartTrendlines Column ChartDual Y-axes Column ChartTop X-axis Column ChartCustomized Axis and Tick Labels

Google Charts Combo

Combo Chart

Google Charts Differentiate

Diff Bar ChartDiff Column ChartDiff Pie ChartDiff Scatter Chart

Google Charts Gantt

Basic Gantt ChartNo Dependencies Gantt ChartGrouped Gantt ChartCritical Path Gantt ChartStyling Arrow Gantt ChartStyling Tracks Gantt Chart

Google Charts Gauge

Gauge Chart

Google Charts Histogram

Basic Histogram ChartCustomized Color Histogram ChartControlling Buckets Histogram ChartMultiple Series Histogram Chart

Google Charts Line

Basic Line ChartCustomized Line ChartCurved Line ChartVisible Points Line ChartLog Scales Line ChartCrosshairs Line ChartTrending Line ChartMaterial Line ChartTop X Line ChartCustomized Axis and Tick Labels

Google Charts Interval

Basic Line IntervalsTailored Line IntervalsBar IntervalsBox IntervalsStick IntervalsSticks Horizontal IntervalsPoint IntervalsArea IntervalsCombining IntervalsBackground Boxes IntervalsPoints and Whiskers IntervalsBox Plot Intervals

Google Charts Organization

Organization Chart

Google Charts Pie

Basic Pie ChartDonut Pie Chart3D Pie ChartRotating Pie ChartExploded Slice Pie ChartRemoving Slice Pie ChartSlice Visibility Threshold Pie Chart

Google Charts Sankey

Basic Sankey DiagramMultilevel Sankey DiagramCustomized Color Sankey DiagramCustomized Label Sankey DiagramCustomized Node Sankey Diagram

Google Charts Scatter

Basic Scatter ChartAnimating Scatter ChartMaterial Scatter ChartDual-Y Scatter ChartTop-X Scatter Chart

Google Charts Stepped

Basic Stepped Area ChartStacked Stepped Area Charts100% Stacked Stepped Area Charts

Google Charts Table

Table Chart

Google Charts Timeline

Basic Timeline ChartLabeled Timeline ChartAdvance Timeline ChartSingle Row Timeline ChartCustomized Color Timeline ChartCustomized Font Timeline ChartOverlapped Gridlines Timeline ChartCustomized Tooltip Timeline Chart

Google Charts Treemaps

Basic TreemapsHighlights TreemapsTooltips Treemaps

Google Charts Trendlines

Linear Trendlines ChartExponential Trendlines ChartCustomized Color Trendlines ChartPolynomial Trendlines ChartCustomized Opacity/WidthVisible Point Trendlines ChartChanging Label Trendlines Chart

Google Charts Word Trees

Basic Word Tree ChartCustomized Font Word Tree ChartStyling Word Tree Chart

Google Charts - Polynomial Trendlines Chart

Last Updated:

How to Draw a Polynomial Trendlines Chart?

Please wait google chart is loading...

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


HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src=""></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>

Share this Page

Meet the Author