Pricing

LineChart handbook

v1.6.4 · @snowui-design-system/components

License: Before reading component documentation, source, or npm usage instructions for the first time, read the full LICENSE. Reuse that review for the same task and version. Public API configuration and internal implementation changes have different license implications. All components use the unified runtime package; source rights remain governed by the license.

Overview

Show data trends as lines, with multiple series, area fills, solid or dashed strokes, axes, grids, and point markers.

When to use it

Use it for continuous values or trends over time. Use BarChart to compare categories. Configure points, axes, labels, and colors through the public chart API.

  • Pass data through series. The component does not invent sample data; xLabels should match the data points.

  • Loading reserves the axis and canvas, and waits for the end to display the data; HoverPanel is turned on by default, and the color and format are publicly configured using the chart.

  • The default root accessible name follows LocaleProvider through lineChart.name; an explicit aria-label takes priority. The data-cell group uses lineChart.cells. Business names, data values, and numeric formatting remain controlled by the caller.

Quick start

This example shows the recommended basic composition. See the sections below for more cases and composition limits.

<script lang="ts">	import { Frame } from '@snowui-design-system/components';	import { LineChart } from '@snowui-design-system/components';</script> <LineChart series={[{ name: 'Component pages', data: [1280, 1460, 1390, 1720, 1880, 2140, 2360], color: 'Primary', strokeWidth: 3 }, { name: 'Quick Start', data: [620, 710, 680, 840, 920, 1040, 1180], color: 'var(--secondary-purple)', strokeStyle: 'dashed' }]} xLabels={['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']} width="100%" height={280} yTicks={[0, 500, 1000, 1500, 2000, 2500]} yTickFormatter={(value) => value < 1000 ? String(value) : `${value / 1000}K`} showYAxis showGrid showHoverPanel hoverPanelVariant="surface" />

API

Keyword Type Default Description
series LineChartSeries[] [] Chart series data; components do not have built-in simulation data
xLabels string[] — Horizontal coordinate labels; use ChartGroup.xLabels or generate internal coordinate labels by data point index when not transmitted
width number | string 800 The overall width of the chart; support 100%, and the internal geometry is recalculated according to the final measured width of the root layer.
height number | string 400 The overall height of the chart; the number is converted to rem according to px semantics
yMin number — The minimum value of vertical coordinates; when not passed, a nice domain is generated according to the data, and the positive data contains 0 by default behavior: automatic / inherit ChartGroup.
yMax number — The maximum value of vertical coordinates; when automatic, it is equal to the actual maximum data value, and it is not wholeged up. Default behavior: automatic / inherit ChartGroup.
yTicks number[] — Vertical coordinate scale Default behavior: automatic nice ticks / inherit ChartGroup.
yTickCount number — The number of target scales used to generate nice ticks when yTicks is not transmitted
yTickFormatter (value: number) => string — Vertical coordinate formatting Default behavior: K format / inherit ChartGroup.
showXAxis boolean — Whether to display horizontal coordinates
showYAxis boolean — Whether to display vertical coordinates
showGrid boolean — Whether to display horizontal grid lines
showGuides boolean — Whether to allow series drawing of node vertical auxiliary lines
showHoverLabel boolean — Whether the numerical label is displayed when the hover / focus node is displayed; when showHoverPanel=true and not explicitly passed in, the actual rendering is closed by default. Default behavior: derived by showHoverPanel.
alwaysShowHoverLabel boolean false Whether to display the numerical label all the time; allow simultaneous display when opened at the same time as showHoverPanel
adaptiveContrast boolean — Adaptive black-and-white contrast: switch the black value and the default black-and-white node and black-fold line according to the light and dark of the pure-color host background and the superimposed column of the same origin; the explicit value of the sub-map is given priority, and the color series and color node do not change. The boundary between light and dark is sRGB grayscale 0.5, which changes with the current column shape and transparency; background pictures or cross-map coordinate transformation are not supported. It is turned on by default and can be explicitly turned off; it is realized by the Adaptive Contrast sharing ability. Default behavior: inherit ChartGroup, otherwise true.
showHoverPanel boolean true Whether to turn on the Chart hover panel, the content is automatically generated according to the current node / cell; turn on by default, and display the panel when hover / focus; return to the numerical hover label when set to false, and explicitly showHoverLabel is preferred
hoverPanelVariant ChartHoverPanelVariant "light" Hover panel visual style
hoverPanelPlacement ChartHoverPanelPlacement "pointer" Hover panel positioning; support anchor / pointer / pin position
showHoverPanelLabel boolean false Whether to display the current classification label at the top of the hover panel
hoverMode ChartGroupHoverMode — Hover hit mode; when cell, the whole grid hit area is generated according to the left and right half of the center of the classification point, and responds to the shared hover
activeCellIndex number | null — Controlled current hover classification point; ChartGroup can be inherited when not transmitted
onCellHoverChange (index: number | null) => void — Classification point hover change callback
valueFormat NumberFormatOptions — The component-level digital format of the node value label; you can set notation: "auto" / "compact" to use the English abbreviation k/m/b/t default behavior: NumberFormats default.
labelFormatter ( value: number, context: { series: LineChartSeries; point: NormalizedPoint; seriesIndex: number; pointIndex: number; }, ) => string — Node value label custom formatting; priority is higher than global, component, series and point level valueFormat
xAxisMode LineChartXAxisMode — Horizontal coordinate point mode; edge means that the first and last data points and the first and last label centers are aligned to both ends of the drawing area, and cell is the classification cell center.
xLabelAutoCull boolean — Whether to automatically reduce the horizontal coordinate label according to the actual measurement width of the complete label; do not delete data points, paths or hit cell
xMaxLabelCount number — The horizontal coordinates show the maximum number of labels; always keep the beginning and end, and reduce the intermediate label and the corresponding data points by the number of steps. Default behavior: - / Inherit ChartGroup.
yLabelAutoCull boolean — Whether to automatically reduce the vertical coordinate label according to the vertical space
yMaxLabelCount number — The vertical coordinates show the maximum number of labels; when yTicks is not passed, it will also be used as the upper limit of generating nice ticks. Default behavior: - / Inherit ChartGroup.
cornerRadius number | string 8 The radius of the corner of the rounded corner of the rounded corner line; it is a straight line when 0
colors (LineChartColor | undefined)[] — Color palette; empty item back to the current colorMode
colorMode LineChartColorMode "sequence" Chart General Color Mode: Default Color Order, Monochrome Lighter, Monochrome
color LineChartColor — The main color of monochrome mode; as the default color of monochromeFade and monochrome at the same time after transmission
monochromeColor LineChartColor "Primary" The monochrome source of monochromeFade; the first series is 100%, the last series is 20%, and the middle series decreases evenly according to the number of seriess.
mutedMonochromeColor LineChartColor "Black4" Monochrome source of monochrome; the default is 4% black body color for all non-customized seriess, and the stroke transparency is maintained at 100%.
showBaseLayer boolean false Whether to display the final size of the same-color outline (shadow / bottom of the place), do not render by default; draw with 4% opacity after turning on, do not participate in the appearance of dynamic effects, do not change the real graphics, hit area or timeline. At the same time, control the complete line and the bottom of Area, and do not turn off the real Area gradient.
appearMotion boolean true Whether to enable the motion effect
appearOnView boolean true Whether the dynamic effect is automatically played when the trigger anchor enters the default position of the viewport; judge according to the real position of the outermost source page in the same source iframe
appearanceProgress number — Controlled progress, range 0..1; after input, the component only renders according to the progress, and does not play by itself.
defaultAppearanceProgress number 0 Uncontrolled initial appearance progress
appearanceDuration number — The total duration of automatic playback is overwritten; when not set, the self-drawing time of each series is fixed at 1000ms, and the total completion time of multiple seriess will increase with 360ms stagger
appearAnchorId string — Dynamic effect triggers anchor element ID; use the chart's own root element when not transmitted
appearAnchorPoint AnchorPoint "top" Use the top, middle or bottom of the anchor element as the trigger point
appearViewportPoint number | "top" | "center" | "bottom" 0.7 The trigger position of the viewport; 0.7 means that the height of the viewport is 70%
scrollAppearance boolean | { distance?: number | string } false Whether to enable the scroll bar timeline control to have a dynamic effect; the same source iframe responds to the outer page scrolling at the same time
scrollAppearanceDistance number | string 320 The scrolling timeline corresponds to the scrolling distance from 0 to 1
onAppearanceProgressChange (progress: number) => void — There is a progress change callback
loading boolean — Data waiting status. Maintain the declared canvas size, coordinate axis and grid, fix the fold line, area and marker at the starting point of the dynamic effect and suspend the interaction; after changing to false, play the dynamic effect according to the current viewport conditions. The chart does not render Skeleton, but also reads the loading context of the upper Frame.
children Snippet — The custom content after the main body of the chart has no parameters; it will not replace the coordinate axis or data series.
class string "" Root layer additional class
style string "" Root layer additional style
enableResponsive boolean true Whether to enable the Frame responsive ability
enableContext boolean true Whether to enable the Frame context ability
enableScaleObserver boolean false Whether to enable Frame scale observer
enableDefaultMotion boolean true Whether to enable the default effect of Frame

See the base component documentation for inherited capabilities not redeclared here. This table lists only named public Props declared by this component.

Usage boundaries and details

HoverPanel shares a three-column layout. The dot-to-name gap prefers --gap-1 and the name-to-value gap prefers --gap-2; both retain a 4 CSS px floor in LTR and RTL. At a 16px root font size the defaults remain 4px / 8px, and larger tokens are preserved. This floor does not apply to vertical panel sections or chart center annotations.

Design principle

  • Atomic chart component: LineChart renders only the chart body. It does not include a title, card background, legend, or toolbar.

  • No built-in sample data: LineChart does not simulate business data within the component; examples, business pages or outer combination components must be explicitly passed into series and xLabels.

  • Area is a series option: Enable a fill with series[].area; there is no separate AreaChart component.

  • Multiple series: One chart can mix solid and dashed lines, default ChartSpec color order, and different marker strategies.

  • Built-in axes: X and Y axes and grid lines are part of LineChart.

  • Y-axis adaptive width: The Y-axis does not use a fixed reserved width; the width of the label area is equal to the actual rendering width of the current widest visible label, and the right edge of the label and the starting point of the drawing area are fixed for 12px. When the label is widened, the drawing area is only compressed according to the actual increased width.

  • Dynamic top safe area: The maximum visible edge distance of the line or marker is at least 8px on the top of the component; at least 16px when the Y axis is displayed. The top value label does not add an additional safe area, and remains at 4px above the node. If necessary, it can overflow the top edge of the drawing area; the safe area of the marker radius does not depend on whether the numerical label is displayed. When the X-axis is displayed, only 8px label spacing and 16px label height are retained at the bottom.

  • Classification axis point model: The horizontal coordinates use the edge mode by default, and the first and tail data points and the first and last label centers are aligned with both ends of the drawing area; it can also be switched to cell mode to make the node located in the center of the equal-width classification cell. When the label cannot be put down, it is recalculated according to the current point mode and automatically reduces the intermediate coordinates and data points, and at least the beginning and end are retained.

  • Configurable markers: Configure markers for a series or one point. Point-level settings take precedence.

  • Hover label: The default hover / focus node displays the numerical label 4px above the point, and does not change the position by touching the top edge of the drawing area; at the same time, the node reverses the color and displays a 0.5px black vertical line behind the node. Font size 12px, regular body, default Black/100%. The digital format consumes NumberFormats.md, and the default is non-integer to display 2 decimal places. alwaysShowHoverLabel can make the numerical label often appear.

  • Rounded corner turning line: LineChart only keeps the rounded turning line; the main body maintains a straight line, and only generates a local rounded corner according to cornerRadius at the flection point, and it is a straight line when cornerRadius=0.

  • Chart general dynamic effect: Each series's own drawing duration is fixed at 1000ms, which is consistent with CircularChart; the line and Area are revealed from left to right. Multiple seriess are started in order according to the delay of 360ms, and each series has an independent slow-out timeline; the marker appears immediately when the line reveals to the corresponding point, and does not slow down the transparency.


2.1 Props

The rest of the undeclared attributes will be passed to the root layer Frame.

2.2 Component method

Way Description
replay() Uncontrolled motion effect is replayed from 0 to 1
resetAppearance() Uncontrolled dynamic effect is immediately reset to 0
reverseAppearance() The uncontrolled dynamic effect first enters the completion state, and then reverses from 1 to 0 along the same timeline.

2.3 Data structure

type LineChartColor = ChartColor;type LineChartStrokeStyle = "solid" | "dashed";type LineChartXAxisMode = "cell" | "edge"; interface LineChartMarkerConfig {  size?: number | string;  color?: LineChartColor | "line";} interface LineChartPointMarkerConfig {  size?: number | string;} interface LineChartPoint {  label?: string;  value: number;  marker?: boolean | LineChartPointMarkerConfig;  valueFormat?: NumberFormatOptions;} interface LineChartSeries {  name: string;  data: (number | LineChartPoint)[];  color?: LineChartColor;  strokeWidth?: number | string;  strokeStyle?: LineChartStrokeStyle;  cornerRadius?: number | string;  markers?: boolean | LineChartMarkerConfig;  guides?: boolean;  area?: boolean;  valueFormat?: NumberFormatOptions;}

Number-format priority: labelFormatter → point.valueFormat → series.valueFormat → component valueFormat → NumberFormatContext → NumberFormats default.

Color priority: series[i].color → colors[i] → colorMode corresponds to the return color. The default series color order is consistent with ChartSpec. color can be used as the main color of the monochrome mode. After passing in, monochromeFade defaults from 100% uniformly to 20% of the last series of the color. monochrome defaults to all non-customized seriess to use this color; when color is not transmitted, monochromeFade defaults to Primary, and monochrome defaults to Black4. Color supports SnowUI symanic color, ordinary CSS color, CSS variable, linear-gradient(...) Strings and gradient objects.

Y-axis scale rules:

  • When yMax / yTicks is not transmitted, the upper limit of the domain is equal to the actual maximum data value of series, and nice ticks is only generated to the last readable scale not higher than the value; the highest point can be higher than the last grid line.

  • The positive data contains 0 as the starting point of the vertical axis by default; when there is a negative number, the minimum value of the data is used to participate in the calculation.

  • The step length is taken according to 1 / 2 / 5 × 10^n, and the number of target scales is controlled by yTickCount.

  • yMaxLabelCount will limit the number of vertical coordinate labels; when yTicks is not transmitted, it will be given priority to generate nice ticks with min(yTickCount, yMaxLabelCount), and when a large number of yTicks are transmitted, it will be diluted and displayed according to the number of steps.

  • yMin / yMax can be used as a domain boundary prompt; yTicks has the highest priority when explicitly passed in.

  • yMin / yMax will not clamp the out-of-range data to the boundary; the lines and Area beyond the domain will first generate visible fragments according to the Y domain, and the round end point will be retained at the boundary. The marker and guide will only be displayed when the point value is in the current Y domain.

  • When showGrid && showXAxis, the total number of horizontal lines defaults to yTickCount=6, of which the bottom one is borne by the x-axis baseline to avoid duplicate drawing of the bottom line.

Area fill rules:

  • area: true generates a vertical gradient when the series uses ordinary colors. The top opacity is 0.04 (4%), and the bottom gradient is 0 (fully transparent). When the series color explicitly uses CSS gradient or ChartGradient object, Area directly follows its color mark and transparency; two color marks of the same color and opaque can form a real color area.

  • Area does not provide color, transparency, gradient or baseline configuration independent of the line; it affects the line and the area at the same time through the series color, and affects the baseline through the vertical axis domain.

  • area is independent of strokeStyle and can be combined with "dotted line + translucent area filling".

Marker rules:

  • Marker is turned off by default; when a node is needed, it is explicitly turned on through series[].markers or point.marker.

  • markers: true uses the Figma Dot structure: the whole 8x8 is composed of two layers of the lower Black/100% circle and the upper White/100% circle; the lower circle is 8x8 and the upper circle is 4x4, using var(--black-100) and var(--white-100) respectively.

  • markers.size and point.marker.size scale the marker proportionally.

  • markers.color only replaces the lower black/100% in the design draft; any color can be transmitted, or "line" can be passed to follow the current line color.

  • Single point point.marker is only allowed to change the size or close, and it is not allowed to define nodes of different colors on the same line.

  • When marker hover / focus, the lower circle becomes White/100% (var(--white-100)), the upper circle becomes Black/100% (var(--black-100)), and a vertical line running through the drawing area is displayed behind the node; the vertical line is 0.5px thick, round head, Black/100%.

  • Marker other structures, lower/upper ratio and hover vertical lines are not available for customization.

Line rules:

  • LineChart only retains the rounded turning line, and the main body is a straight line segment. Only at the middle inflection point, the front and rear line segments are truncated according to cornerRadius and local rounded corners are generated.

  • When cornerRadius=0, a rounded corner is not generated, which is shown as an ordinary straight line.

  • strokeStyle="dashed" Use Figma stroke settings: dash 2, gap 4, round cap.


Layout model

Main layout model: internal atomic layout.

  • The root layer is Frame, and the interior is a single SVG drawing area.

  • The root layer directly observes the final display size and recalculates the SVG coordinates; width="100%" / height="100%" does not require the page to return the container size.

  • The horizontal classification axis calculates the number of points according to max(x(xLabels.length, ...series.data.length); the cell mode node position is bounds.left + (plotWidth / count) * (index + 0.5), and the edge mode node position is bounds.left + (plotWidth / (count - 1)) * index, which is in the middle when single points.

  • Each X-axis label occupies one point interval; text is centered and truncated to one line. The label area is 16px high.

  • In edge mode, the center of the first and last label and the first and last data points are the same x coordinates, and the label cell allows it to extend to the outside of the drawing area.

  • X-axis label automatic display rule: according to the actual measurement of the complete text width of the final font and the original data position of the current xAxisMode, the adjacent visible text is at least 4px apart. Thinning only reduces the label, and does not delete or rearrarge the data points, broken line paths, marker, guide and hit cell. The retention index must form an equal number of steps; if the first and last two complete labels still cannot be placed, all X labels will be hidden.

  • Y-axis label thinning rule: When automatically generating the scale, give priority to generating the appropriate quantity through yTickCount / yMaxLabelCount; when yTicks is explicitly passed in or the vertical space is insufficient, the display label is reduced according to the rules of the beginning and end retention and equal steps, and the horizontal grid line follows the visible Y label.

  • The distance from the top of the X-axis label cell to the bottom x-axis baseline is 8px.

  • The top of the drawing area is calculated by the shared content perception rule: half of the line width or the current maximum marker radius is used as the upward overflow of the graphic; ordinary graphics maintain a safe distance of 8px, and the Y-axis top scale needs at least 16px. The top value label does not increase the value, continues to maintain the 4px above the node and can overflow the top edge of the drawing area; the overflow of the marker is always included, regardless of whether the label is displayed. When there is an X axis, bottom=24px only contains the above 8px spacing and 16px label height; when there is no X axis, bottom=0.

  • The width of the Y-axis label area is determined by the actual SVG rendering width of the widest text in the all-visible Y label, and is not estimated with fixed bounds or the number of characters; the spacing between the right edge of the label and the starting point of the line segment in the drawing area is fixed to 12px. For example, when the formatter outputs 100000, the drawing area is only reduced according to the actual width added by the text than the short scale, and the fixed spacing remains unchanged.

  • It does not access the three-slot protocol and does not undertake the arrangement of general sub-elements.

For details, please refer to LayoutProtocol.md §12.7 (source code reference: specs/maintainers/LayoutProtocol.md).


Accessibility integration with Frame

  • The root uses role="group" and a locale-aware default accessible name ("Line chart" in en-US); an explicit aria-label takes priority. Interactive hit targets retain their independent semantics.

  • Each marker uses an independent aria-label, and the content includes series names, horizontal coordinate labels and values.

  • The inside of the marker contains a transparent hit circle, which ensures that the keyboard focus and mouse hit do not only depend on the radius of the visible dot.

  • The marker visible layer does not take over the pointer events, and the white center, black outer circle and transparent hit circle are all triggered by the hit circle; the default hit area is not less than 16x16.

  • hoverMode="cell" works independently or within ChartGroup. Each cell hit area spans the plot around its category point, and the marker responds to hover or focus within that cell.

  • loading retains the complete canvas and coordinate structure, and only restores the fold line, area and marker to the starting point of the dynamic effect; the root Frame clearly closes Skeleton. Empty series={[]} can cooperate with xLabels, yMin, yMax to establish the final coordinates first.

  • The explicit input enableResponsive / enableContext / enableScaleObserver / enableDefaultMotion.

  • class, style and undeclared attributes are transmitted to the root Frame.


Layers and dynamic effects

The SVG layer from bottom to top is:

  1. defs: color gradient, Area gradient, series reveal clipPath.

  2. Grid / axis layer: horizontal grid line and x axis baseline.

  3. Base layer: When showBaseLayer=true, draw the complete Area and the same color 4% placehold layer of the line path, do not participate in the dynamic effect; do not render by default.

  4. Area layer: Real Area path, revealed from left to right according to the corresponding series clipPath.

  5. Guide layer: the vertical auxiliary line of the node follows the progress of the corresponding series.

  6. Series layer: the real line path is revealed from left to right according to the corresponding series clipPath.

  7. Marker layer: point markers, hover guide lines, and transparent hit circles appear when the reveal reaches each point.

  8. Axis label layer: horizontal and vertical coordinate text.

Appearance motion follows the shared chart API:

  • The complete chart is displayed directly when appearMotion={false}.

  • By default, it will play automatically after entering the viewport, and the playback order is in the order of the series array.

  • Each series uses fillProgress and opacityProgress from appearance-timeline.ts.

  • Each series draws for 1000ms, matching CircularChart.

  • Series start 360ms apart by default; the first starts immediately.

  • fillProgress controls the left-to-right reveal clip, using easeOut with power 6.

  • opacityProgress controls the opacity of the line, area, and guide line with the same easing.

  • Markers do not use opacityProgress; they appear as soon as the reveal reaches their X coordinate.

  • The shared chart API supports controlled appearanceProgress, scroll timelines, and replay(), resetAppearance(), and reverseAppearance().


LineChart style overlay

Read the full LICENSE first; reuse that review for the same task, version, and scope.

First use public component Props to match the desired appearance, preserving the existing look where possible. If changes are necessary, follow the style selection and override order: use your own class (including Tailwind already in the project) or an instance style. The names below are public overrides actually consumed by source; check their scope and do not modify private DOM. Choose the correct SnowUI token family. External apps need not install SnowUI website utilities.

Variable Purpose and default reference
--snowui-line-chart-axis-color-override Coordinate axis label color (default var(--black-100))
--snowui-line-chart-axis-font-size-override Coordinate axis label font size (default 14px)
--snowui-line-chart-axis-line-color-override X-axis baseline color (default var(--black-40))
--snowui-line-chart-grid-color-override Grid line color (default var(--black-10))
--snowui-line-chart-height-override Overall height (default 400px)
--snowui-line-chart-hover-label-color-override Hover label color (default var(--black-100))
--snowui-line-chart-width-override Overall width (default 800px)

Design Guide · Token · Combination boundary

LineChart type and status

Required Props: no named required Props.

Bindable Props: this component declares no named two-way binding; handle state updates through public callbacks or its host.

Inheritance statement: no interface inheritance. The inheritance ability is subject to the public document of the base class; the fields in Omit have been excluded and cannot be used as they are according to the base class.

Share Frame API · Return API

The following type declarations are actually referenced by public Props and come from source. A Svelte Snippet denotes a content fragment; ComponentProps denotes the Props of the corresponding component.

LineChartSeries

Source: components/src/components/LineChart.svelte

export interface LineChartSeries {        name: string;        data: (number | LineChartPoint)[];        color?: LineChartColor;        strokeWidth?: number | string;        strokeStyle?: LineChartStrokeStyle;        cornerRadius?: number | string;        markers?: boolean | LineChartMarkerConfig;        guides?: boolean;        area?: boolean;        valueFormat?: NumberFormatOptions;    }

LineChartPoint

Source: components/src/components/LineChart.svelte

export interface LineChartPoint {        label?: string;        value: number;        marker?: boolean | LineChartPointMarkerConfig;        valueFormat?: NumberFormatOptions;    }

LineChartPointMarkerConfig

Source: components/src/components/LineChart.svelte

export interface LineChartPointMarkerConfig {        size?: number | string;    }

NumberFormatOptions

Source: components/src/lib/number-format.ts

export interface NumberFormatOptions {    fractionDigits?: number;    valueLabelFractionDigits?: number;    percentFractionDigits?: number;    preserveTrailingZeros?: boolean;    useGrouping?: boolean;    emptyValue?: string;    locale?: string;    notation?: NumberNotation;    compactThreshold?: number;    compactFractionDigits?: number;}

NumberNotation

Source: components/src/lib/number-format.ts

export type NumberNotation = "standard" | "compact" | "auto";

LineChartColor

Source: components/src/components/LineChart.svelte

export type LineChartColor = ChartColor;

ChartColor

Source: components/src/lib/chart/colors.ts

export type ChartColor = SnowUIColor | string | ChartGradient;

SnowUIColor

Source: components/src/lib/color.ts

export type SnowUIColor = keyof typeof SNOWUI_COLOR_TOKENS;

ChartGradient

Source: components/src/lib/chart/colors.ts

export interface ChartGradient {    type?: "linear";    angle?: number;    stops: (string | ChartGradientStop)[];}

ChartGradientStop

Source: components/src/lib/chart/colors.ts

export interface ChartGradientStop {    color: SnowUIColor | string;    offset?: number | string;    opacity?: number;}

LineChartStrokeStyle

Source: components/src/components/LineChart.svelte

export type LineChartStrokeStyle = "solid" | "dashed";

LineChartMarkerConfig

Source: components/src/components/LineChart.svelte

export interface LineChartMarkerConfig {        size?: number | string;        color?: LineChartColor | "line";    }

ChartHoverPanelVariant

Source: components/src/lib/chart/hover-panel.ts

export type ChartHoverPanelVariant = "dark" | "light" | "surface";

ChartHoverPanelPlacement

Source: components/src/lib/chart/hover-panel.ts

export type ChartHoverPanelPlacement =    | "anchor-top"    | "anchor-side"    | "pointer"    | "pin-top-left"    | "pin-top"    | "pin-top-right"    | "pin-right"    | "pin-bottom-right"    | "pin-bottom"    | "pin-bottom-left"    | "pin-left"    | "pin-center";

ChartGroupHoverMode

Source: components/src/lib/chart/group-context.ts

export type ChartGroupHoverMode = "item" | "cell";

NormalizedPoint

Source: components/src/components/LineChart.svelte

interface NormalizedPoint {        label: string;        value: number;        marker?: boolean | LineChartPointMarkerConfig;        valueFormat?: NumberFormatOptions;        x: number;        y: number;    }

LineChartXAxisMode

Source: components/src/components/LineChart.svelte

export type LineChartXAxisMode = "cell" | "edge";

LineChartColorMode

Source: components/src/components/LineChart.svelte

export type LineChartColorMode = ChartColorMode;

ChartColorMode

Source: components/src/lib/chart/colors.ts

export type ChartColorMode = "sequence" | "monochromeFade" | "monochrome";

AnchorPoint

Source: components/src/components/LineChart.svelte

type AnchorPoint = "top" | "center" | "bottom";