Skip to content

Custom Settings

AstroChart provides extensive customization through a plain settings object passed as the fourth argument to Chart. Every key is optional — unspecified keys fall back to the library defaults.

import { Chart } from '@astrodraw/astrochart'
const settings = {
COLOR_BACKGROUND: '#1a1a2e',
POINTS_COLOR: '#e0e0e0',
}
const chart = new Chart('my-chart', 600, 600, settings)
const radix = chart.radix(data)

SettingTypeDefaultDescription
COLOR_BACKGROUNDstring'#fff'SVG background fill color
POINTS_COLORstring'#000'Color of planet symbols
SIGNS_COLORstring'#000'Color of zodiac sign symbols
CIRCLE_COLORstring'#333'Color of chart ring circles
LINE_COLORstring'#333'Color of spoke/house lines
SYMBOL_AXIS_FONT_COLORstring'#333'Color of As/Ds/Mc/Ic labels
CUSPS_FONT_COLORstring'#000'Color of cusp number labels
COLOR_ARIESstring'#FF4500'Sign sector color — Aries
COLOR_TAURUSstring'#8B4513'Sign sector color — Taurus
COLOR_GEMINIstring'#87CEEB'Sign sector color — Gemini
COLOR_CANCERstring'#27AE60'Sign sector color — Cancer
COLOR_LEOstring'#FF4500'Sign sector color — Leo
COLOR_VIRGOstring'#8B4513'Sign sector color — Virgo
COLOR_LIBRAstring'#87CEEB'Sign sector color — Libra
COLOR_SCORPIOstring'#27AE60'Sign sector color — Scorpio
COLOR_SAGITTARIUSstring'#FF4500'Sign sector color — Sagittarius
COLOR_CAPRICORNstring'#8B4513'Sign sector color — Capricorn
COLOR_AQUARIUSstring'#87CEEB'Sign sector color — Aquarius
COLOR_PISCESstring'#27AE60'Sign sector color — Pisces
COLORS_SIGNSstring[](array of the 12 above)Ordered array of all 12 sign colors
SettingTypeDefaultDescription
SYMBOL_SCALEnumber1Global scale factor for all symbols
SYMBOL_SUNstring'Sun'Key name for Sun symbol
SYMBOL_MOONstring'Moon'Key name for Moon symbol
SYMBOL_MERCURYstring'Mercury'Key name for Mercury symbol
SYMBOL_VENUSstring'Venus'Key name for Venus symbol
SYMBOL_MARSstring'Mars'Key name for Mars symbol
SYMBOL_JUPITERstring'Jupiter'Key name for Jupiter symbol
SYMBOL_SATURNstring'Saturn'Key name for Saturn symbol
SYMBOL_URANUSstring'Uranus'Key name for Uranus symbol
SYMBOL_NEPTUNEstring'Neptune'Key name for Neptune symbol
SYMBOL_PLUTOstring'Pluto'Key name for Pluto symbol
SYMBOL_CHIRONstring'Chiron'Key name for Chiron symbol
SYMBOL_LILITHstring'Lilith'Key name for Lilith symbol
SYMBOL_NNODEstring'NNode'Key name for North Node symbol
SYMBOL_SNODEstring'SNode'Key name for South Node symbol
SYMBOL_FORTUNEstring'Fortune'Key name for Part of Fortune symbol
SYMBOL_ASstring'As'Ascendant axis label
SYMBOL_DSstring'Ds'Descendant axis label
SYMBOL_MCstring'Mc'Midheaven axis label
SYMBOL_ICstring'Ic'Imum Coeli axis label
SYMBOL_SIGNSstring[](all 12 sign names)Ordered array of sign name keys
CUSTOM_SYMBOL_FNfunction | nullnullCustom symbol renderer — see Custom Symbols
SettingTypeDefaultDescription
MARGINnumber50Outer margin in px
PADDINGnumber18Inner padding in px
SHIFT_IN_DEGREESnumber180Chart rotation offset (0° = West)
INDOOR_CIRCLE_RADIUS_RATIOnumber2Divisor for inner-most circle radius
INNER_CIRCLE_RADIUS_RATIOnumber8Divisor for planet ring inner edge
RULER_RADIUSnumber4Divisor for degree ruler band width
COLLISION_RADIUSnumber10Planet collision avoidance radius (px) at scale 1
SettingTypeDefaultDescription
POINTS_STROKEnumber1.8Stroke width for planet symbols
SIGNS_STROKEnumber1.5Stroke width for sign symbols
CIRCLE_STRONGnumber2Stroke width for circles
SYMBOL_AXIS_STROKEnumber1.6Stroke width for axis labels
CUSPS_STROKEnumber1Stroke width for cusp lines
STROKE_ONLYbooleanfalseRender all symbols as outlines only (no fill)
SettingTypeDefaultDescription
ASPECTSAspect(see below)Aspect definitions — degree, orbit, and color

Default ASPECTS value:

{
conjunction: { degree: 0, orbit: 10, color: 'transparent' },
square: { degree: 90, orbit: 8, color: '#FF4500' },
trine: { degree: 120, orbit: 8, color: '#27AE60' },
opposition: { degree: 180, orbit: 10, color: '#27AE60' }
}
SettingTypeDefaultDescription
SHOW_DIGNITIES_TEXTbooleantrueShow dignity labels next to planets
DIGNITIES_RULERSHIPstring'r'Label for rulership dignity
DIGNITIES_DETRIMENTstring'd'Label for detriment
DIGNITIES_EXALTATIONstring'e'Label for exaltation
DIGNITIES_EXACT_EXALTATIONstring'E'Label for exact exaltation
DIGNITIES_FALLstring'f'Label for fall
DIGNITIES_EXACT_EXALTATION_DEFAULTDignity[](Crowley positions)Exact exaltation positions
SettingTypeDefaultDescription
ANIMATION_CUSPS_ROTATION_SPEEDnumber2Transit rotation animation speed (0–4)
SettingTypeDefaultDescription
ADD_CLICK_AREAbooleanfalseEnable click-event areas on chart elements
SettingTypeDefaultDescription
DEBUGbooleanfalseLog internal debug information to the console

import { Chart } from '@astrodraw/astrochart'
const darkSettings = {
COLOR_BACKGROUND: '#1a1a2e',
POINTS_COLOR: '#e0e0ff',
SIGNS_COLOR: '#aaaacc',
CIRCLE_COLOR: '#444466',
LINE_COLOR: '#444466',
SYMBOL_AXIS_FONT_COLOR: '#aaaacc',
CUSPS_FONT_COLOR: '#aaaacc',
COLOR_ARIES: '#cc3300',
COLOR_TAURUS: '#664411',
COLOR_GEMINI: '#336699',
COLOR_CANCER: '#1e7a4a',
COLOR_LEO: '#cc3300',
COLOR_VIRGO: '#664411',
COLOR_LIBRA: '#336699',
COLOR_SCORPIO: '#1e7a4a',
COLOR_SAGITTARIUS: '#cc3300',
COLOR_CAPRICORN: '#664411',
COLOR_AQUARIUS: '#336699',
COLOR_PISCES: '#1e7a4a',
COLORS_SIGNS: ['#cc3300','#664411','#336699','#1e7a4a','#cc3300','#664411','#336699','#1e7a4a','#cc3300','#664411','#336699','#1e7a4a'],
ASPECTS: {
conjunction: { degree: 0, orbit: 10, color: 'transparent' },
square: { degree: 90, orbit: 8, color: '#ff6633' },
trine: { degree: 120, orbit: 8, color: '#33cc77' },
opposition: { degree: 180, orbit: 10, color: '#6699ff' }
}
}
const chart = new Chart('chart', 600, 600, darkSettings)
chart.radix(data)

Render all planet and sign symbols as outlines with no fill — useful for monochrome or print output:

const chart = new Chart('chart', 600, 600, { STROKE_ONLY: true })
chart.radix(data)

Override just the aspect colors without touching any other settings:

const chart = new Chart('chart', 600, 600, {
ASPECTS: {
conjunction: { degree: 0, orbit: 10, color: '#9b59b6' },
square: { degree: 90, orbit: 8, color: '#e74c3c' },
trine: { degree: 120, orbit: 8, color: '#2ecc71' },
opposition: { degree: 180, orbit: 10, color: '#3498db' }
}
})
chart.radix(data)

Increase the size of all planet and sign symbols:

const chart = new Chart('chart', 700, 700, { SYMBOL_SCALE: 1.4 })
chart.radix(data)
const chart = new Chart('chart', 600, 600, { SHOW_DIGNITIES_TEXT: false })
chart.radix(data)