DSIMA
 All Classes Namespaces Files Functions Variables
svgXmlDisplay.js File Reference

Functions

function formatIfFloat (text)
 Parse and format to 2 decimals the text is a float. More...
 
function buildDisplay ()
 Build the display. More...
 
function displayGeneralText ()
 Build and display the general (non element-specific) text. More...
 
function createLineChart (containerId, data, labels, title, ylabel)
 Create a line chart from data for each periods. More...
 
function elementPopupText (id, name, xmlElement)
 Display the popup text of an xml element. More...
 
function associate (element, xmlData)
 Try to associate an element (SVG or not) with the data in the provided xml document. More...
 
function changeTime (newt)
 Change the current time period. More...
 
function displayFullscreen (id)
 Display an element in full screen. More...
 
function buildTimeline ()
 Build the timeline in the div with id : "timeline". More...
 
function displayXML (dataXml)
 Display the daily result given by its xml content. More...
 

Variables

var xml = null
 display Link the data and the svg display. More...
 
var t =-1
 Current period. More...
 
var T =0
 Total number of periods. More...
 
var PERIOD_START =1
 First index of periods. More...
 
var popupBox =null
 Popup box element pointer. More...
 

Function Documentation

function associate (   element,
  xmlData 
)

Try to associate an element (SVG or not) with the data in the provided xml document.

Parameters
elementElement to associate (SVG or not).
xmlDataXML data element to look into
function buildDisplay ( )

Build the display.

The display includes the information popups for the nodes and the update of the image.

function buildTimeline ( )

Build the timeline in the div with id : "timeline".

function changeTime (   newt)

Change the current time period.

The reference begins at 1, 0 being the genera view.

Parameters
newtNew period.
function createLineChart (   containerId,
  data,
  labels,
  title,
  ylabel 
)

Create a line chart from data for each periods.

Parameters
containerIdIdentification tag of the chart's container.
dataList of array with data for each period.
labelsList of labels for each data set.
titleChart title.
ylabelOrdinates label.
function displayFullscreen (   id)

Display an element in full screen.

Parameters
idElement id.
function displayGeneralText ( )

Build and display the general (non element-specific) text.

function displayXML (   dataXml)

Display the daily result given by its xml content.

Parameters
dataXmlXML document with the data.
function elementPopupText (   id,
  name,
  xmlElement 
)

Display the popup text of an xml element.

Parameters
idId of the element.
nameName of the element
xmlElementXml data of the element.
function formatIfFloat (   text)

Parse and format to 2 decimals the text is a float.

Parameters
textText to format.
Returns
String.

Variable Documentation

var PERIOD_START =1

First index of periods.

var popupBox =null

Popup box element pointer.

var t =-1

Current period.

var T =0

Total number of periods.

var xml = null

display Link the data and the svg display.

Parsed xml data.