Skip to main content

Chart

This is the main object of AstroChart. You will use it to create the Radix chart, and also it defines all the configuration.

constructor

const chart = new Chart( 'paper', 800, 800, settings)
ParamTypeDescriptionRequired
idstringid of the HTML node that will be the container of the svgYES
widthnumberwidth of the chart svgsYES
heightnumberheight of the chart svgYES
settingsobjectobject containing all the configurations of the Chart. See more in SettingsNO

Radix

const radix = chart.radix(data)
ParamTypeDescriptionRequired
data.planetsobjectobject with all planets as keys and an array as valueYES
data.cuspsnumber[]array with 12 positions each one representing a cuspYES
//data example
const data = {
"planets":{
"Pluto":[63],
"Neptune":[110],
"Uranus":[318],
"Saturn":[201],
"Jupiter":[192],
"Mars":[210],
"Moon":[268],
"Sun":[281],
"Mercury":[312],
"Venus":[330]},
"cusps":[296, 350, 30, 56, 75, 94, 116, 170, 210, 236, 255, 274]
}

For more information, checkout Radix component