Show:

ia.GradientLegend Class

Module: ia

A class for rendering a gradient legend.

Constructor

ia.GradientLegend

(
  • id
)

Parameters:

  • id String

    The id of the the legend.

Methods

_build

(
  • cw
  • ch
)
private

Builds the legend.

Parameters:

  • cw Number

    The width.

  • ch Number

    The height.

_highlightBlock

(
  • value
)
private

Highlights the block legend

Parameters:

  • value Number

    The value of the item.

_highlightPoint

(
  • value
)
private

Highlights the point legend.

Parameters:

  • value Number

    The value of the item.

_renderBlock

() private

Renders the block legend.

_renderPoint

() private

Renders the point legend.

addEventListener

(
  • eventType
  • fnc
  • obj
)

Add an event listener.

Parameters:

  • eventType String

    The type of event to listen for.

  • fnc Function

    The function to call when the event occurs.

  • obj Object

    An optional parent object.

clearHighlight

()

Clears all highlights.

clearSelection

()

Clears all selections.

dispatchEvent

(
  • event
)

Dispatch an event to the listeners.

Parameters:

  • event Object

    The event object.

hide

()

Hides the legend.

highlight

(
  • id
)

Highlights the legend.

Parameters:

  • id String

    The id of the item.

removeListener

(
  • obj
)

Removes all event listeners for the given object.

Parameters:

  • obj Object

    The object.

render

()

Renders the legend.

select

(
  • id
)

Selects.

Parameters:

  • id String

    The id of the item.

show

()

Shows the legend.

unselect

(
  • id
)

Unselects.

Parameters:

  • id String

    The id of the item.

Properties

container

JQUERY Element

The container that holds the object.

highlightColor

String

The item highlight color.

id

String

The id.

style

Object

The style.

Default: {fillStyle:'#EFEFEF', strokeStyle:'#cccccc', lineWidth:'0.5', lineJoin:'miter'}

thematic

ia.Thematic

A thematic that can be associated with the data in the legend.