μμ (Assets)
μ리μ¦λ κ²μ΄μ§ λλ μΆ label λ±μ ν¨κ³Όμ μΌλ‘ νμν λ μ°Έμ‘°νλ 미리 μ μλ μ€νμΌ μμλ€μ΄λ€.
Color List
μ°¨νΈ μ€μ μμ μμ
typeμ 'colors'μ΄λ€.
μ¬μ©ν μμ λͺ©λ‘μ 보κ΄νκ³ μ€ν μ€
series.pointColors λ±μμ μ¬μ©ν μ μλλ‘ νλ€.
μ΅μμ 'asset' νλͺ©μ μμ μμ΄ν μΌλ‘ μ€μ νλ€.
{
assets: [{
type: 'colors',
id: 'color1',
colors: ['#88f', '#aaf', '#bbf', '#ddf', '#eef'],
mode: 'suffle'
}],
series: {
pointsColors: 'color1',
}
}
'type'μ΄ μ§μ λμ§ μκ³ , 'colors' λ°°μ΄μ΄ μ‘΄μ¬νλ©΄ 'colors'λ‘ μμ±λλ€.
Image List
μμ typeμ 'images'μ΄λ€.
Linear Gradient
μμ
typeμ 'lineargradient'μ΄λ€.
μμμ κ³Ό λμ μ¬μ΄μ μμμ΄ μμν λ³κ²½λλ ν¨κ³Όλ₯Ό νμνλ€.
μ±μ°κΈ° μμ΄λ μ μμΌλ‘ μ¬μ©λ μ μλ€.
{
assets: [{
type: 'lineargradient',
id: 'gradient-1',
color: '#0088ff',
opacity: [1, 0]
}],
series: {
style: {
fill: 'url(#gradient-1)',
fillOpacity: 1,
strokeWidth: '2px'
}
}
}
Radial Gradient
μμ
typeμ 'radialgradient'μ΄λ€.
μ μ€μ¬μμ λ°κΉ₯μΌλ‘ μμμ΄ λ³ν΄κ°λ ν¨κ³Όλ₯Ό νμνλ€.
μ±μ°κΈ° μμ΄λ μ μμΌλ‘ μ¬μ©λ μ μλ€.
{
assets: [{
type: 'radialgradient',
id: 'gradient-1',
color: '#0088ff',
cx: 0.3,
cy: 0.3,
rd: 0.4
}],
series: {
type: 'bubble',
style: {
fill: 'url(#gradient-1)'
}
}
}
Pattern
μμ
typeμ 'pattern'μ΄λ€.
λν ν¨ν΄μ μ§μ ν΄μ μ±μ°κΈ°(fill) μμ λμ μ¬μ©ν μ μλ€.
{
assets: [{
type: 'pattern',
id: 'pattern-1',
pattern: 0,
style: {
stroke: 'black',
}
}],
series: {
style: {
fill: 'url(#pattern-1)'
}
}
}