Is it possible to take a table read in from File Reader and connect to this API to return a chart? I'm trying to also get a better understanding of the scope of the Google API node outside of Analytics.
Is it possible to take a table read in from File Reader and connect to this API to return a chart? I'm trying to also get a better understanding of the scope of the Google API node outside of Analytics.
Hello,
Would love to know as well.
As of KNIME 2.10 you can install the KNIME JavaScript based nodes plugin, which is available under the KNIME labs extensions. After installing find the 'Generic JavaScript View' node. This node allows you to provide your own CSS and JavaScript to code a view.
I did a little proof of concept for the Google Charts API for you. A couple pointers:
Below is a basic example, which I took of the Chart Gallery and adapted it to work with dynamic loading.
$('body').append('<div id="chart_div"></div>'); drawChart = function() { var data = google.visualization.arrayToDataTable([ ['Country', 'Popularity'], ['Germany', 200], ['United States', 300], ['Brazil', 400], ['Canada', 500], ['France', 600], ['RU', 700] ]); var options = {}; var chart = new google.visualization.GeoChart(document.getElementById('chart_div')); chart.draw(data, options); } $.getScript('https://www.google.com/jsapi') .done(function( script, textStatus ) { google.load('visualization', '1', {packages:['corechart'], callback:drawChart}); }) .fail(function( jqxhr, settings, exception ) { alert("Loading Google API failed."); });
html, body, #chart_div { width: 100%; height: 100%; margin: 0; } #chart_div { overflow: hidden; }
Looks like the URL in the JavaScript code block automatically got converted into a link.
Line 21 should be:
$.getScript('https://www.google.com/jsapi')