# Class: c3.Legend.PlotLegend

Defined in: | js/c3-legend.coffee
Inherits: | c3.Legend

## Overview

TODO: Support for swimlane layer types
TODO: Create a Legend type for Pie charts
TODO: Support for decimated layers

A type of C3 Legend that is linked with a C3 Chart Plot. It will display each layer in the plot as a legend items. For stacked layers, each stack will be a nested item. The names in the legend will be based on the `name` attribute of the layers and stacks. If the `name` is `false`, then the layer will not be displayed.

The legend is linked with the plot, so hovering over the legend items will highlight the cooresponding data in the plot. The functionality leverages the base legend and can be further customized or adjusted by the user.

### Author:

- Douglas Armstrong

### See also:

- c3.Legend
- c3.Plot

## Variables Summary

version =

      0.1

type =

      'plot_legend'

plot =

      undefined

  [c3.Plot] Plot to link with this legend

html_names =

      false

  [Boolean] By default, the layer and stack names will display as raw text. If you would like HTML tags in the name string to render as HTML, then enable this option. Please be careful of user-provided strings and security.

hover_fade =

      0.2

  [Number] When hovering over an item the other layers/stacks in the plot will fade to this percentage of their original opacity.

duration =

      750

  [Number] The duration in milliseconds that animations should take, such as stacked elements floating down to the bottom of the chart.

### Variable inherited from c3.Legend

version type data key filter nest nest_key hoverable list_options item_options nested_item_options bullet_options nested_bullet_options anchor height width anchor_styles handlers

## Instance Method Summary

- # (void) _init() Bound
- # (void) _update() Bound
- # (void) _style() Bound

## Inherited Method Summary

### Methods inherited from c3.Legend

#_init #_update #_style #render #resize #redraw #restyle #init #_prep #size #_size #update #draw #_draw #style

## Instance Method Details

# (void) _init() Bound

# (void) _update() Bound

# (void) _style() Bound

Quickly fuzzy find classes, mixins, methods, file:

- T Open fuzzy finder dialog

Control the navigation frame:

- L Toggle list view
- C Show class list
- I Show mixin list
- F Show file list
- M Show method list
- E Show extras list

You can focus and blur the search input:

- S Focus search input
- Esc Blur search input