Class Index | File Index

Classes


Class Biojs.HeatmapViewer


Version 1.0.0.

Extends Biojs.

Defined in: Biojs.HeatmapViewer.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This component takes a JSON data object and draws a D3 object The expected JSON format is specified under the option 'json' of the HeatmapViewer options.
Field Summary
Field Attributes Field Name and Description
<static>  
Biojs.HeatmapViewer.HEATMAP
Public module that renders a heatmap
<inner>  
opt
Default values for the options: target: "YourOwnDivId", jsonData: {}, showScale: true, showExportToImageButton: false,
<static>  
Biojs.HeatmapViewer.target
public variables
Method Summary
Method Attributes Method Name and Description
<static>  
Biojs.HeatmapViewer.constructor(options)
Methods borrowed from class Biojs:
addListener, extend, getId, listen, raiseEvent, removeListener, setEventHandlers, setOptions
Class Detail
Biojs.HeatmapViewer(options)
This component takes a JSON data object and draws a D3 object The expected JSON format is specified under the option 'json' of the HeatmapViewer options. Please remember to use jQuery in compatibility mode, particularly a good idea if you use other libraries.
Author: Guy Yachdav.
var painter = new Biojs.HeatmapViewer({
						jsonData:
   		[{
		    "col": 0,
		    "row": 0,
		    "label": "M",
		    "score": 27,
		    "row_label": "A"
		}, {
		    "col": 0,
		    "row": 1,
		    "label": "M",
		    "score": 5,
		    "row_label": "C"
		}, {
		    "col": 1,
		    "row": 0,
		    "label": "M",
		    "score": 43,
		    "row_label": "D"
		}, {
		    "col": 1,
		    "row": 1,
		    "label": "M",
		    "score": 58,
		    "row_label": "E"
		}],
						user_defined_config: {
							colorLow: 'blue',
							colorMed: 'white',
							colorHigh: 'red',
							scoreLow: 10,
							scoreMid: 15,
							scoreHigh: 20
						},
						target: 'YourOwnDivId'
				});
Parameters:
{Object} options
An object with the options for HeatmapViewer component.
Options detailed:
{string} target
Identifier of the DIV tag where the component should be displayed.
{string} jsonData
The jsonData object contains the data to be displayed The jsonData object must follow this format: [{ col: int, // columns position row: int, // row position label: string, // column label score: float, // cell's score row_label: string // row label }] Example 4 items grid
   		[{
		    "col": 0,
		    "row": 0,
		    "label": "M",
		    "score": 27,
		    "row_label": "A"
		}, {
		    "col": 0,
		    "row": 1,
		    "label": "M",
		    "score": 5,
		    "row_label": "C"
		}, {
		    "col": 1,
		    "row": 0,
		    "label": "M",
		    "score": 43,
		    "row_label": "D"
		}, {
		    "col": 1,
		    "row": 1,
		    "label": "M",
		    "score": 58,
		    "row_label": "E"
		}]
	
{Onject} [user_defined_config={colorLow:
'blue', colorMed: 'white', colorHigh: 'red'}] Configuration options for the component
{Onject} [show_zoom_panel=true]
Display the zoom panel. default: true
{Onject} [showScale=true]
Display the scale object. default: true
Requires:
jQuery Core 1.9.1
D3 Version 3
Field Detail
<static> {[type]} Biojs.HeatmapViewer.HEATMAP
Public module that renders a heatmap

<inner> opt
Default values for the options: target: "YourOwnDivId", jsonData: {}, showScale: true, showExportToImageButton: false,

<static> Biojs.HeatmapViewer.target
public variables
Method Detail
<static> Biojs.HeatmapViewer.constructor(options)
Parameters:
options

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Apr 17 2014 17:42:42 GMT+0100 (BST)