Hello,

You can create Sankey chart without coding in Google Sheets and Excel.

ChartExpo™ is a data visualization tool with 50+ custom chart types.

You can make charts with few clicks..
Sharing video on How to create Sankey diagram <https://bit.ly/3q3dlJv>. 

Installation Sources:

Google Sheets: 
https://chartexpo.com/utmAction/MTErY29tbXVuaXR5K2dzK1NCK0dHKw==

MS Excel & 365: 
https://chartexpo.com/utmAction/MTErY29tbXVuaXR5K3hsK1NCK0dHKw==

Regards.
On Thursday, June 17, 2021 at 5:50:43 PM UTC+5 kosa.g...@gmail.com wrote:

> Hi! I'm following the developer guide at 
> https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#full
> .
>
> I get 'Sankey chart.html:66 Uncaught (in promise) TypeError: 
> chart.setAction is not a function' error in the browser console for the 
> following implementation.
>
> I'm wondering what do I wrong?
>
>     <script type="text/javascript">
>         google.charts.load("current", {packages:['sankey', 'wordtree']});
>         
>         google.charts.setOnLoadCallback(drawSankeyChart);
>
>         function drawSankeyChart() {
>           var data = new google.visualization.DataTable();
>           data.addColumn('string', 'From');
>           data.addColumn('string', 'To');
>           data.addColumn('number', 'Weight');
>           data.addRows([
>             ...
>           ]);
>       
>           // Set chart options
>           var options = {
>             width: 1000,
>             tooltip: {
>                 trigger: 'selection'
>             }
>           };
>       
>
>           var chart = new 
> google.visualization.Sankey(document.getElementById('sankey_multiple'));
>       
>           chart.setAction({
>                 id: 'remove',
>                 text: 'Remove',
>                 action: function() {
>                     selection = chart.getSelection();
>                     alert(selection[0].row + 'will be removed');
>                     }
>                 });
>
>             chart.draw(data, options);
>          };
> ...
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/055412b2-b3e7-4ca5-9884-187edfe26608n%40googlegroups.com.

Reply via email to