-
Book Overview & Buying
-
Table Of Contents
Mastering ArcGIS Server Development with JavaScript
By :
In our application, we will explore using D3 to add graphs to our application. We'll use it to replace parts of the dojox/charting code where we add the graphs to our map popup. Many of the steps will be similar, but some will be different.
Since our application relies heavily on the Dojo framework, we will add our D3.js library with AMD. We'll add the reference to D3 in our dojoConfig.packages list. The new dojoConfig script should look like the following:
dojoConfig = {
async: true,
packages: [
{
name: 'y2k',
location: location.pathname.replace(/\/[^\/]*$/, '') +'/js'
},
{
name: "d3",
location: "http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.12/"
}
]
};Now that our AMD code knows where to look for the D3 library, we can add a reference to it in our census application. The D3 library will then be available to our census widget, but it will not interfere with other applications that...
Change the font size
Change margin width
Change background colour