ia.DiscreteLegend Class
A class for rendering a set of legend classes as a html table.
Constructor
ia.DiscreteLegend
-
id
Parameters:
-
id
StringThe id of the legend.
Item Index
Methods
Methods
._dispatchItemEvent
()
private
Dispatches item events.
_addMouseEvents
-
obj
Adds mouse events to the passed jquery object.
Parameters:
-
obj
JQUERY ElementThe jquery object.
addEventListener
-
eventType
-
fnc
-
obj
Add an event listener.
Parameters:
-
eventType
StringThe type of event to listen for.
-
fnc
FunctionThe function to call when the event occurs.
-
obj
ObjectAn optional parent object.
clearHighlight
()
Clears all highlights.
clearSelection
()
Clears all selections.
dispatchEvent
-
event
Dispatch an event to the listeners.
Parameters:
-
event
ObjectThe event object.
hide
()
Hides the legend.
highlight
-
id
Highlights the legend class that contains the given id.
Parameters:
-
id
StringThe id of the item.
removeListener
-
obj
Removes all event listeners for the given object.
Parameters:
-
obj
ObjectThe object.
render
()
Renders the legend.
renderCategoric
-
classes
Renders the categoric legend classes.
Parameters:
-
classes
ia.LegendThe legend classes.
renderLegend
-
classes
Renders the passed legend classes.
Parameters:
-
classes
ia.LegendThe legend classes.
renderNumeric
-
classes
Renders the numeric legend classes.
Parameters:
-
classes
ia.LegendThe legend classes.
select
-
id
Selects.
Parameters:
-
id
StringThe id of the item.
show
()
Shows the legend.
unselect
-
id
Unselects.
Parameters:
-
id
StringThe id of the item.
Properties
container
JQUERY Element
The container that holds the object.
highlightColor
String
The item highlight color.
id
String
The id.
interactive
Boolean
Indicates if the legend is interactive.
Default: true
isLegendComponent
Boolean
Indicates this is a legend component.
Default: true
layout
String
The layout of the legend.
Default: "vertical"
selectionColor
String
The item selection color.
style
Object
The style.
Default: {fillStyle:'#EFEFEF', strokeStyle:'#cccccc', lineWidth:'0.5', lineJoin:'miter'}