chart

Docs › Reference

Options

Every option createChart accepts.

Everything but data is optional. With nothing else you get a line chart in a card, in the document language (Korean if unsupported), following the page theme.

Type and data

OptionDefaultWhat it does
type'line''line' | 'area' | 'bar' | 'pie' | 'donut' | 'scatter' | 'radar' | 'gauge' | 'pyramid' | 'heatmap' | 'calendar' | 'treemap' | 'funnel' | 'waterfall'
data(required){ labels?, series }; see Data format

Card header

OptionDefaultWhat it does
eyebrow-Small text above the title (shown in capitals)
title-Title; also used in the summary, table caption and file name
subtitle-Grey line under the title
value-Headline figure; numbers get commas, prefix and unit
delta-Change badge: a number is a percent, a string is shown as is
deltaUpIsGoodtrueIs a rise good?
deltaColors'semantic''semantic' (good green, bad red) or 'korea' (up red ▲, down blue ▼)
deltaLabel-Text after the badge, e.g. 'vs last month'
footnote-Small text under the chart, e.g. 'In millions'
description-Read by screen readers before the automatic summary
skin'card''card' | 'plain' | 'sparkline'

Size

OptionDefaultWhat it does
widthparent widthWidth (px) used when the parent has no width
heightper typePlot height (px) or 'auto' (width × aspectRatio)
aspectRatio0.5625Height ÷ width when height is 'auto'

Shape

OptionDefaultWhat it does
horizontalfalseHorizontal bars
stackedfalsetrue or 'percent' (100% stacked)
smoothfalseSame as curve: 'smooth'
curve'straight''straight' | 'smooth' | 'step'
nulls'gap''gap' | 'connect' | 'zero'
points'auto'Show points (auto: up to 30)
pointShape'circle''circle' | 'square' | 'diamond'
lastPointtrue for one lineHighlight the last point
barRadius6Bar corner radius at the value end (px)
barWidth0.82 / 0.78Share of the band a bar group fills
gradienttrueSoft gradient on bars and areas
stackTotalsfalseTotals above stacked bars
dataLabelsfalsetrue | 'end': values at bar and line ends
otherThreshold0.02Pie and donut slices below this share fold into "Other"
startAngle0Pie and donut start angle (degrees, 0 = top)
donutHole0.62Donut hole size (0–1)
donutLabelthe totalText in the hole; false hides it
gauge-{ min, max, bands: [{ to, color }], label }
pyramid-{ percent }: pyramid bars as a share of the whole (Population pyramid)
heatmap-{ min, max, color, legend, labels, weekStart }: heatmap and calendar color ramp and key (Heatmap)
colorBy'series'Treemap: 'series' | 'change' (two hues around a gray zero)
treemap-{ range }: the change (%) with the strongest color

Axes, legend, tooltip

OptionDefaultWhat it does
xAxis / yAxis-{ title, min, max, format, ticks, step, integer, reverse, grid, type, beginAtZero, labels }; see below
y2Axis-The right y axis, only when a series has axis: 'right'; the same options plus unit and prefix
legendtop for 2+ seriesboolean | 'top' | 'bottom' | 'right'
tooltiptrueboolean | { format(value, ctx) }

Numbers and dates

OptionDefaultWhat it does
numberFormat'korean' in Korean, else 'compact''korean' | 'compact' | 'comma' | 'percent' | (v) => string
scale-Divide axis ticks by this (1000000 for millions)
unit-Unit after values
prefix-Symbol before values
decimalsup to 2Decimals in tooltips and labels
dateFormat'auto'Date pattern, e.g. 'MMM D', 'YYYY-MM-DD'
timeZoneruntime zoneIANA zone for reading and writing dates, e.g. 'Asia/Seoul' (needed for SSR on UTC servers)

Colors and language

OptionDefaultWhat it does
colors-Colors in series order
palette'default''default' | 'korea' | 'mono'
negativeColor-Color of bars below zero
theme'auto''light' | 'dark' | 'auto'
languagedocument lang, else ko'ko' | 'en' | 'ja' | 'zh' (add more with registerLocale)
locale-Override some interface strings

Features

OptionDefaultWhat it does
animationtrueFirst-draw animation (off with reduced motion)
zoomfalseZoom and pan
downsampleauto above 2,000Thin line/area points with LTTB to this many; false draws all. CSV and table keep every value
progressive5,000개 넘으면 자동Paint big line/area/scatter charts in steps: placeholder, coarse picture, full detail. A number sets the limit; false paints at once
annotations-{ x, y, bands }
exportingtrueDownload button and ⋯ menu
tablefalseShow the data table
noDataper languageMessage when there is nothing to draw
group-Charts with the same name share the crosshair
loadingfalseLoading placeholder

Callbacks and the rest

OptionDefaultWhat it does
onClick-(point: ChartPoint) => void
onReady-(chart) => void, once after creation
telemetrytrueOnce a day, report the domain and version to 82chart.com (never data); false turns it off
framework-Set by the framework wrappers

xAxis · yAxis · y2Axis

OptionDefaultWhat it does
title-Axis title
min / maxautoRange
formatnumberFormatTick text (same values, or a function; a category axis receives the label)
ticksautoRough tick count (round numbers near it)
gridtrueGrid lines
typeauto'category' | 'linear' | 'time'
beginAtZerotrue for bars and areasStart at zero
labelstrueDraw tick labels
integerfalseWhole-number ticks only (counts, people)
stepautoFixed tick step, e.g. 10
reversefalsey axis: small values on top (ranks); horizontal bars: reverse the category order
unit / prefix-y2Axis only: unit of the right axis and its series