legend
์ฐจํธ ์๋ฆฌ์ฆ ๊ตฌ์ฑ์ ์ง๊ด์ ์ผ๋ก ์ดํดํ ์ ์๋๋ก ๋์์ฃผ๋ ๋ฒ๋ก ์ค์ ๋ชจ๋ธ.
visible ๊ธฐ๋ณธ๊ฐ์ด undefined์ด๊ณ ,
๋ฐ๋ก ์ง์ ํ์ง ์์ผ๋ฉด ์๋ฆฌ์ฆ๊ฐ ๋ ์ด์ ํฌํจ๋ผ์ผ legend๊ฐ ํ์๋๋ค.
๋ฒ๋ก ๊ฐ์ ํ์ด์ง๋ฅผ ์ฐธ์กฐํ๋ค.
Properties
align: 'center'|'left'|'right'
์ํ ๋ฐฐ์น. ๊ฐ์ ์ง์ ํ์ง ์์ผ๋ฉด, ๊ธฐ๋ณธ๊ฐ์ด location ์ด 'body'์ผ ๋๋ 'left', 'left', 'right'์ผ ๋๋ 'center'์ด๋ค.
'center'
'left'
'right'
default: undefined
alignBase: 'body'|'chart'|'parent'
legend ์ ๋ ฌ ๊ธฐ์ค.
'body'
'chart'
'parent'
์์ ๋ชจ๋ธ์ด ์กด์ฌํ๋ ๊ฒฝ์ฐ ์์ ๋ชจ๋ธ ์์ญ ๊ธฐ์ค. ์์๊ฐ ์์ผ๋ฉด ๊ธฐ๋ณธ๊ฐ(๋๋ถ๋ถ 'body')๊ณผ ๋์ผ. ex) subtitle์ธ ๊ฒฝ์ฐ title ๊ธฐ์ค.
default: 'body'
backgroundStyle: SVGStyles | string
๋ฐฐ๊ฒฝ ์คํ์ผ ์ . ๋ฐฐ๊ฒฝ ์์ ๋ฐ ๊ฒฝ๊ณ์ ์คํ์ผ์ ์ง์ ํ ์ ์๋ค.
SVGStyles
Name | Type | Optional |
---|---|---|
fill | string | true |
fillOpacity | string | true |
fontFamily | string | true |
fontSize | string | true |
fontStyle | string | true |
fontWeight | string | true |
rx | string | true |
stroke | string | true |
strokeDasharray | string | true |
strokeWidth | string | true |
textAlign | 'center' | 'left' | 'right' | true |
gap: number
location ์ด 'body'๊ฐ ์๋ ๋, legend view์ ๋๋จธ์ง chart ์์ญ ์ฌ์ด์ gap.
default: 6
itemGap: number
legend ์์ดํ ๋ค ์ฌ์ด์ ๊ฐ๊ฒฉ.
default: 8
itemsAlign: 'center'|'end'|'start'
ํ ๋ผ์ธ์ item๋ค์ด ๋ฐฐ์น๋๋ ์์น.
'center'
์ํ ํน์ ์์ง์ ์ค์์ผ๋ก ๋ชฐ์์ ๋ฐฐ์นํ๋ค.'end'
์ํ์ผ ๋ ์ค๋ฅธ์ชฝ, ์์ง์ผ ๋๋ ์๋์ชฝ์ผ๋ก ๋ชฐ์์ ๋ฐฐ์นํ๋ค.'start'
์ํ์ผ ๋ ์ผ์ชฝ, ์์ง์ผ ๋๋ ์์ชฝ์ผ๋ก ๋ชฐ์์ ๋ฐฐ์นํ๋ค.
default: 'center'
itemsPerLine: number
ํ ์ค ๋น ํ์ํ ์ต๋ legend ํญ๋ชฉ ์.
default: undefined
layout: 'auto'|'horizontal'|'vertical'
item ๋ฐฐ์น ๋ฐฉํฅ.
'auto'
legend๊ฐ ์ฐจํธ ์ข์ฐ์ ๋ฐฐ์น๋๋ฉด item๋ค์ ์์ง์ผ๋ก ๋ฐฐ์น. legend๊ฐ ์ฐจํธ ์ํ์ ๋ฐฐ์น๋๋ฉด item๋ค์ ์ํ์ผ๋ก ๋ฐฐ์น.'horizontal'
item๋ค์ ์ํ์ผ๋ก ๋ฐฐ์น'vertical'
item๋ค์ ์์ง์ผ๋ก ๋ฐฐ์น
default: 'auto'
lineGap: number
๋ผ์ธ ์ฌ์ด์ ๊ฐ๊ฒฉ.
default: 4
location: 'body'|'bottom'|'left'|'right'|'top'
ํ์ ์์น.
'body'
์ฐจํธ ๋ณธ์ฒด ์์ญ ๋ด๋ถ์ ํ์ํ๋ค.'bottom'
์ฐจํธ ๋ณธ์ฒด ์๋ ํ์ํ๋ค.'left'
์ฐจํธ ๋ณธ์ฒด ์ผ์ชฝ์ ํ์ํ๋ค.'right'
์ฐจํธ ๋ณธ์ฒด ์ค๋ฅธ์ชฝ์ ํ์ํ๋ค.'top'
์ฐจํธ ํ์ดํ ์๋ ํ์ํ๋ค.
default: 'bottom'
markerGap: number
marker์ text์ฌ์ด์ ๊ฐ๊ฒฉ.
default: 4
markerSize: number
marker ํฌ๊ธฐ.
default: 10 ํฝ์
.
markerVisible: boolean
marker ํ์ ์ฌ๋ถ.
default: true
maxHeight: string | number
์์ง ๋ฐฐ์น ์ผ ๋, ์ต๋ ๋์ด๋ฅผ ํฝ์ ๋จ์์ ํฌ๊ธฐ ํน์ body ๋์ด์ ๋ํ ์๋ ๊ธธ์ด๋ฅผ '%'๋ก ์ง์ ํ๋ค.
default: undefined
maxWidth: string | number
์ํ ๋ฐฐ์น ์ผ ๋, ์ต๋ ๋๋น๋ฅผ ํฝ์ ๋จ์์ ํฌ๊ธฐ ํน์ body ๋๋น์ ๋ํ ์๋ ๊ธธ์ด๋ฅผ '%'๋ก ์ง์ ํ๋ค.
default: undefined
offsetX: number
๋ฒ๋ก์ body ํน์ ์ฐจํธ ๊ฒฝ๊ณ ์ฌ์ด์ ์ํ ๊ฐ๊ฒฉ.
default: 0
offsetY: number
๋ฒ๋ก์ body ํน์ ์ฐจํธ ๊ฒฝ๊ณ ์ฌ์ด์ ์์ง ๊ฐ๊ฒฉ.
default: 0
seriesHovering: boolean
์๋ฆฌ์ฆ๊ฐ ์ฐ๊ฒฐ๋ ๋ฒ๋ก ์์ดํ ์ ๋ง์ฐ์ค๊ฐ ์ฌ๋ผ๊ฐ๋ฉด ๋๋จธ์ง ์๋ฆฌ์ฆ๋ค์ ๋ฐํฌ๋ช ์ฒ๋ฆฌํด์ ์ฐ๊ฒฐ๋ ์๋ฆฌ์ฆ๋ฅผ ๊ฐ์กฐํ๋ค.
default: true
style: SVGStyles | string
์คํ์ผ์ ํน์ class selector.
SVGStyles
Name | Type | Optional |
---|---|---|
fill | string | true |
fillOpacity | string | true |
fontFamily | string | true |
fontSize | string | true |
fontStyle | string | true |
fontWeight | string | true |
rx | string | true |
stroke | string | true |
strokeDasharray | string | true |
strokeWidth | string | true |
textAlign | 'center' | 'left' | 'right' | true |
useTextColor: boolean
๋ฒ๋ก ํญ๋ชฉ์ ํ ์คํธ์๋ marker์ ๋์ผํ ์์์ ์ ์ฉํ๋ค.
default: undefined
verticalAlign: 'bottom'|'middle'|'top'
์์ง ๋ฐฐ์น. ๊ฐ์ ์ง์ ํ์ง ์์ผ๋ฉด, ๊ธฐ๋ณธ๊ฐ์ด location ์ด 'body'์ผ ๋๋ 'top', 'top', 'bottom'์ผ ๋๋ 'middle'์ด๋ค.
'bottom'
'middle'
'top'
default: undefined
visible: boolean
ํ์ ์ฌ๋ถ.
๋ช
์์ ์ผ๋ก true๋ก ์ค์ ๋๊ฑฐ๋, ๋ช
์์ false๊ฐ ์๋๋ฉด์ ํ์ ํญ๋ชฉ ์๊ฐ 1๋ณด๋ค ํด ๋ ํ์๋๋ค..
default: undefined