Graphics Reference
In-Depth Information
}, ...
]
}
Tip
Online CSV-to-JSON converters in which you can paste your data and
click a button to transform it are easily found with a quick web search.
Create the Page Structure
Once you have your data file, you are ready to begin coding. If you don't
already have a place in mind to insert your visualization, start by creating
the following simple web page. The following HTML code creates an empty
document with a title and some basic styling, loads the JavaScript
dependencies, and, after adding a graph container to the body, loads the
supplychain.js
file, which you create next:
<!
DOCTYPE
html>
<html>
<head>
<
meta
charset
=
"utf-8"
>
<
title
>Supply Chain</
title
>
<
script
src
=
"jquery.js"
></
script
>
<
script
src
=
"raphael.js"
></
script
>
<
script
src
=
"aperture.js"
></
script
>
<!-- container styling -->
<
style
>
#graph
{
width
:
1200px
;
height
:
1400px
;
margin
:
0 auto 0 auto
;
}
</
style
>
</
head
>
<body>
<
div
id
=
"graph"
></
div
>
<
script
src
=
"supplychain.js"
></
script
>