UNPKG

@tanstack/charts

Version:

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/api/readme/charts.png?theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/

21 lines (20 loc) 798 B
import type { ChartKey } from './types.js'; export type StackOrder = 'input' | 'ascending' | 'descending' | 'inside-out' | readonly ChartKey[]; export type StackOffset = 'diverging' | 'normalize' | 'center' | 'wiggle'; export interface StackAnchor { /** Series whose interval contains the zero anchor. */ series: ChartKey; /** Position within that interval: zero is its start and one is its end. */ fraction?: number; } export interface StackOptions { order?: StackOrder; offset?: StackOffset; reverse?: boolean; /** Translate each position so a point within one series lands on zero. */ anchor?: StackAnchor; } export interface StackLayout extends StackOptions { readonly type: 'stack'; } export declare function stack(options?: StackOptions): StackLayout;