hi can i ask how to get all point generate in my polynomila graph using 
javacsript


On Friday, March 17, 2017 at 9:55:39 PM UTC+8, jlarroy ita wrote:
>
> Hello.
>
> I need to create a ScatterChart with axis X and Y in logarithmic scale and 
> with a power trendline but, as far as I know, Google Charts only supports 
> three types of trendlines (linear, polynomial, and exponential) but not 
> power trendlines. Is there any way to add power trendlines?
>
> I copy a sample of my source code at the end of this message. Attached you 
> can find an image with the result (made with Excel) which I'm looking for.
>
> Thanks a lot.
>
>       J.Larroy
>
> <html>
>   <head>
>     <script type="text/javascript" src="
> https://www.gstatic.com/charts/loader.js";></script>
>     <script type="text/javascript">
>       google.charts.load('current', {'packages':['corechart']});
>       google.charts.setOnLoadCallback(drawChart);
>       function drawChart() {
>         var data = google.visualization.arrayToDataTable([
>           ['serie1', 'serie2'],
> [0.02891, 750.0],
> [0.01292, 750.0],
> [0.01385, 750.0],
> [0.01487, 750.0],
> [1.60000, 1.48161],
> [1.70000, 1.90133],
> [2.30000, 0.95124],
> [27.70000, 0.11861],
> [50.00000, 0.06090],
> [178.50000, 0.01314],
> [11.10000, 0.24285]
>         ]);
>
>         var options = {
>           hAxis: {scaleType:'log'},
>           vAxis: {scaleType:'log'},
>           chartArea: {width:'50%'},
>           trendlines: {
>             0: {
>               type: 'linear',
>               showR2: true,
>               visibleInLegend: true
>             }
>           }
>         };
>
>         var chartLinear = new 
> google.visualization.ScatterChart(document.getElementById('chartLinear'));
>         chartLinear.draw(data, options);
>       }
>     </script>
>   </head>
>   <body>
>     <div id="chartLinear" style="height: 350px; width: 800px"></div>
>   </body>
> </html>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-chart-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-chart-api/ad52af24-8d61-4ec8-b62e-3705ada5d889%40googlegroups.com.
  • Power trendline jlarroy ita
    • Re: Power trendline Maria Christine Joy Salamat

Reply via email to