d3

===== React and D3 ===== React-D3 is een library die je [[React]] met D3 laat combineren, wat volgens velen een ideale combinatie is om grafieken met JavaScript te maken. http://www.reactd3.org/ Ik heb gedeeld hoe je de Getting started met behulp van JSPM ipv browsify of webpack kan doorlopen: https://github.com/react-d3/react-d3.github.io/issues/8

===== Tag Cloud script for dokuwiki (work in progress)===== thanks to: http://jsfiddle.net/adiioo7/RUTpJ/light/ \ see also: [[dokuwiki]]

<?php

class CommandPluginExtension_pagecloud extends CommandPluginExtension {

function getCachedData($embedding, $params, $paramHash, $content, &$errorMessage) { $files = glob(‘data/meta/*.changes’); // usort($files, function($a, $b) { // return filesize($a) < filesize($b); // });

foreach($files as $file) {
  $name = basename($file,'.changes');
  if ($name=='sidebar') continue;
  if ($name=='start') continue;

  $fontsize = filesize($file)/1000;
  $fontsize = ceil($fontsize*$fontsize+14);
  
  $lines[] = "{ text: '$name', size:$fontsize }";
  // $lines[] = "<a style='float:right' href='$name'><font size='$fontsize'>$name</font>&nbsp;</a>";
}

return '<svg id="d3cloud"></svg> <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> <script src="https://jardindesconnaissances.googlecode.com/svn-history/r82/trunk/public/js/d3.layout.cloud.js" charset="utf-8"></script>

’; } } ?> ```