Hi,

If you are looking to create a Sankey Diagram online or in Microsoft Power 
BI then try VisioChart <https://visiochart.com/> they offer 10 level of 
Sankey Diagram on Power BI and web platform.

On Tuesday, November 9, 2021 at 2:44:24 AM UTC+5 Claus Hack wrote:

> Hi, 
> i don't know if you still need it, but setAction is probably not 
> compatible with sankey. The documentation is misleading. 
> See:  https://github.com/google/google-visualization-issues/issues/2349
>
> [email protected] schrieb am Donnerstag, 17. Juni 2021 um 14:50:43 
> UTC+2:
>
>> 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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-visualization-api/38ea6f8e-e888-4e13-bfff-acc33022073bn%40googlegroups.com.

Reply via email to