@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);

Dependents (1)

Package Sidebar

Install

npm i @stamen/legend

Weekly Downloads

2

Version

0.2.0

License

ISC

Last publish

Collaborators

  • ericsoco
  • mojodna
  • stamen