Alberto Pepe edited intro.tex  almost 9 years ago

Commit id: d054098db0c71079c4ce7c458b75ede55455ea26

deletions | additions      

       

Adding a D3.js figure in your document could not be simpler.   \textbf{Step 1}. Insert From the folder view (folder icon in top sidebar), navigate to the \verb|figures| folder and create  a new block folder, e.g., called \verb|d3js|, and  in your article (clicking \verb|Insert| at the bottom of an existing paragraph). it a new file, e.g. called \verb|d3js.html|  \textbf{Step 2}. Select Insert  the block type Javascript code of the d3 visualization in the file you created. \textbf{Note}: for security reasons, you have  to be \verb|HTML| form include all your data and CSS in  the drop-down menu JS file or load it from URLs  on the top right. \textbf{https}. Also- please load all d3 and related resources from CDNs on secure sites (https), such as \verb|https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js|.  \textbf{Step 3}. Copy and paste the Javascript code of the d3 visualization Click on QuickEdit  in the editor. \textbf{Note}: for security reasons, you have to include all your data top bar, select \verb|layout.md|,  and CSS in add  the JS file or load it from URLs on \textbf{https}. Also- please load all d3 and related resources from CDNs on secure sites (https), such as \verb|https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js|. path to your figure, e.g. \verb|figures/d3js/d3js.html|  \textbf{Step 4}. Save and refresh the page. Go back to your main view.  You're done. done!  Your d3.js should now magically appear, as in the figure below (click inside the image to play with it).