@stamen/legend

0.2.0 • Public • Published

Legend

Clickable legend that can be used to label and toggle layers of a visualization.

Part of the @stamen/panorama toolkit.

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import { Legend } from '@panorama/toolkit';

let legendData = {
	items: [
		'narratives',
		'cotton',
		'sugar'
	],
	selectedItem: this.state.selectedItem || 'narratives'
};

ReactDOM.render(<Legend { ...legendData } onItemSelected={ this.onItemSelected }/>, document.body);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    1
  • 0.1.0
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i @stamen/legend

Weekly Downloads

1

Version

0.2.0

License

ISC

Last publish

Collaborators

  • ericsoco
  • mojodna
  • stamen