1.0.0 • Published 6 months ago

@lg-charts/chart-card v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

Charts ChartCard

Expandable card component for visually wrapping multiple charts.

Installation

PNPM

pnpm add @lg-charts/legend

Yarn

yarn add @lg-charts/legend

NPM

npm install @lg-charts/legend

Example

import { ChartCard } from '@lg-charts/chart-card';
import { Chart } from '@lg-charts/core';

<ChartCard title="My Group of Charts">
  <Chart />
  <Chart />
<ChartCard>;

Properties

NameDescriptionTypeDefault
titleThe title to display in the chart header.string
defaultOpen (optional)Defines the default state of the card.booleantrue
isOpen (optional)Forces the card state.boolean
onToggleButtonClick (optional)Callback fired when a user clicks the open/close toggle button.(event: MouseEventHandler<HTMLButtonElement>) => void
headerContent (optional)Content that will be rendered to the right of the title. Useful for adding components such as IconButton's that control functionality in the chart.React.ReactNode