Difference between revisions of "Widget:GraphInteractivity"
m (update (don't include JS on widget page itself)) |
m (document -> window (load event)) |
||
Line 22: | Line 22: | ||
var g_coloredNodes; | var g_coloredNodes; | ||
− | + | window.addEventListener( "load", function()
{
g_graphs = document.querySelectorAll( "svg > g.graph" ); | |
g_coloredNodes = [ [ g_graphs[0].querySelector( "g#h4" ), "green" ] ]; | g_coloredNodes = [ [ g_graphs[0].querySelector( "g#h4" ), "green" ] ]; | ||
Revision as of 09:04, 25 May 2018
This widget allows you to display the Space API data (provided as JSON)
Created by Xopr
Using this widget
To insert this widget, use the following code:
{{#widget:GraphInteractivity}}
This will add javascript logic that enables 'interactivity' to graphs.
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:GraphInteractivity article.