From 40c41922d38f2a5508f91166db294684ce384b66 Mon Sep 17 00:00:00 2001 From: brent-shaw Date: Sat, 6 Apr 2019 20:47:22 +0200 Subject: [PATCH] Small typo in example --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5c021c5e419..7230aeb5024 100644 --- a/index.html +++ b/index.html @@ -73,7 +73,7 @@

Usage

To create a CodeFlower, include the CodeFlower.js file together with d3.js, just like in this page. Create a new CodeFlower instance using a CSS selector (of the div where the flower should be inserted), and the width and height of the desired visualization. Then, bind JSON data to the flower using CodeFlower.update(), and you're done.

 var myFlower = new CodeFlower("#visualization", 300, 200);
-myflower.update(jsonData);
+myFlower.update(jsonData);
         

Input data format

The jsonData format taken as input to update() is extremely simple. It's a JavaScript object representing a file tree structure. Each node must have a name (the file or directory name), leaf nodes must have a size (the number of lines of code or the file), and directory nodes must have a children property containing an array of nodes. As an example, here is the input for the currently displayed CodeFlower. You can modify it at will and click the update button to see the effect of your changes on the CodeFlower.