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.