Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

Node / Charts · guide

Shared chart appearance & layout

Current Apexify.js 6.0.0 documentation for Shared chart appearance & layout.

apexify.jsRuntime: nodeCURRENTSince 6.0.0

Almost every chart accepts dimensions, appearance, labels.title, legend, and grid with the same ideas (exact keys vary slightly — see each chart page).


dimensions

SOURCEtypescript
typescript
Studio
dimensions?: {  width?: number;  height?: number;  padding?: { top?: number; right?: number; bottom?: number; left?: number };};

Defaults are typically 800×600 (or inferred for wide bar plots — set width explicitly for dashboards).

Vertical bar charts: doc comment in BarChartOptions — if width omitted, width may be inferred from X-axis span (~10px per unit). For fixed layouts (comparison cells, exports), always set dimensions.width.


appearance — ChartAppearanceExtended

Painted first via paintChartCanvasBackground (chartBackground.ts) — aligned with createCanvas backgrounds:

FieldRole
backgroundColorFlat fill when no image / customBg.
backgroundGradientgradient union over full canvas.
backgroundImagePath/URL stretched to canvas (resolveMediaPath).
customBgSame shape as CanvasConfig.customBg — source, fit, align, opacity, filters.
blurApplied with customBg pipeline.
bgLayersBackgroundLayer[] — color / gradient / image / pattern / presetPattern / noise.
patternBgPatternOptions procedural overlay (after layers).
noiseBg{ intensity? } grain.
axisColor, axisWidthDefault axis stroke styling (charts apply where relevant).
arrowSizeAxis arrow geometry where enabled.
borderRadius, borderWidth, borderColorOptional outer frame (e.g. line chart).

Unused today (reserved): yAxisArrowExtensionPastMaxTickPx, yAxisArrowTipOffsetY — Y-axis arrow disabled in line renderer comments.


Legend block (cartesian family pattern)

Common fields across bar, horizontal bar, line, scatter, combo, radar, polar area:

FieldNotes
showDefault true where legend auto-built from series/slices.
entriesOverride LegendEntry[] (label, color, gradient).
positionLegendPlacement — corners/edges; aliases topLeft, bottom_right, … normalized internally.
spacing, fontSize, paddingBox layout.
backgroundColor, backgroundGradient, borderColorBox chrome.
textColor, textGradient, textStyleLabel rendering (EnhancedTextStyle).
maxWidth, wrapTextWrapping.
fit, minWidth, widthcontent vs stretch legend sizing (line/scatter/combo/radar/polar).

Pie splits legends.standard vs legends.connected (leader lines) — see Pie.


EnhancedTextStyle (labels)

Used inside labels.* and legend.textStyle:

fontPath, fontName, fontFamily, fontSize, bold, italic, shadow, stroke, glow — renders via renderEnhancedText helpers (GlobalFonts.registerFromPath when fontPath + fontName).


grid (cartesian)

SOURCEtypescript
typescript
Studio
grid?: { show?: boolean; color?: string; width?: number };

Horizontal bar adds lineWidth, style: solid | dashed | dotted.


Next steps