Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/charts/src/Chart.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ export const docs = {
'Use the same series array for Chart and any directly composed ChartTooltip so labels, colors, and resolved points stay aligned.',
},
{
guidance: false,
guidance: true,
description:
'Use color as the only way to distinguish series or communicate status. Pair color with labels, mark shapes, direct annotations, or another visible cue.',
"Keep the default straight segments of line() and area() for measured data, so each value reads as a point joined to the next one. A smoothed curve such as `curve: 'monotone'` draws values between the points and reads as decoration.",
},
{
guidance: false,
description:
"Pass `curve: 'monotone'` to line() or area() for measured data. Keep the default straight segments, so each value reads as a point joined to the next one; a smoothed curve reads as decoration.",
'Use color as the only way to distinguish series or communicate status. Pair color with labels, mark shapes, direct annotations, or another visible cue.',
},
{
guidance: false,
Expand Down
6 changes: 5 additions & 1 deletion packages/charts/src/marks/area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ const CURVES = {
export interface AreaOptions {
color?: string;
opacity?: number;
/** How points join. Default `'linear'`: straight segments. */
/**
* How points join. Default `'linear'`: straight segments, which measured
* data keeps so each value reads as a point. `'monotone'` and `'natural'`
* draw smoothed values between the points.
*/
curve?: keyof typeof CURVES;
stack?: string;
gradient?: boolean;
Expand Down
6 changes: 5 additions & 1 deletion packages/charts/src/marks/line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export type CurveType = keyof typeof CURVES;

export interface LineOptions {
color?: string;
/** How points join. Default `'linear'`: straight segments. */
/**
* How points join. Default `'linear'`: straight segments, which measured
* data keeps so each value reads as a point. `'monotone'` and `'natural'`
* draw smoothed values between the points.
*/
curve?: CurveType;
strokeWidth?: number;
dots?: boolean;
Expand Down