ludo.chart.LabelList

ludo.chart.


new ludo.chart.LabelList(config)

Displays a list of labels for chart data (color box + label).

The Label List fetches it's label from the data source textOf function, and the
color from the items __color attribute or from the data source colorOf function.

When chart data are nested like


{ "course": "Math", "children": [ { "age": "0-14", "value": 100 }, { "age": "15-19", "value" : "150" } ] }

Labels for "0-14" and "15-19" will be shown(i.e. the leaf nodes).

How labels are rendered(side by side or beneath each other) is set by the orientation attribute OR
the size of the area designated to the labels. You can set orientation to
"vertical" or "horizontal". If orientation is not set and width is greater
than height, the labels will be displayed vertically. If height is greater
than width, the labels will be rendered vertically.

Parameters:
Name Type Description
config Object
Properties
Name Type Description
textStyles Object

CSS styling of text, default: { fill:'#000000', 'font-size' : '13px', 'font-weight' : 'normal' }

textStylesOver Object

CSS styling on mouse over, default: { 'font-weight': 'bold' }

boxStyles Object

CSS for box around labels, default: { 'stroke' : '#000' }

boxStylesOver Object

mouse over css for box around labels, default: undefined

orientation String

Orientation of labels. If not set, orientation will be set automatically
base on space allocated to the labels. When width is greater than height, the
labels will be displayed horizontally, side by side. Otherwise, they will be
displayed vertically.

Source: