Shape Annotation
shape ์์ฑ์ผ๋ก ์ง์ ํ ๋ํ์ ์ฐจํธ๋ body(์๋ฆฌ์ฆ๊ฐ ํ์๋๋ plotting ์์ญ)์ ์ง์ ํ ์์น์ ํ์ํ๋ค.
shape ์์ฑ์ผ๋ก ํ์ํ ๋ํ์.
'circle', 'diamond', 'square', 'triangle', 'star', 'rectangle' ๋ฑ์ผ๋ก ์ค์ ํ ์ ์๋ค.
์ ์ชฝ ํฐ ๋ณ์ noClip์ด true๋ก ์ค์ ๋ผ์ body ์์ญ ๋ฐ๊นฅ๊น์ง ํ์๋๊ณ ์๋ค.
์๋์ชฝ ์ชฝ ํฐ ๋ณ์ noClip์ด ์ค์ ๋์ง ์์ body ์์ญ์ ํด๋ฆฝ๋๊ณ ์๋ค.
์ค๊ฐ์ ๊ธด ์ง์ฌ๊ฐํ์ front๊ฐ true๋ก ์ค์ ๋ผ์ ์๋ฆฌ์ฆ ์์ ํ์๋๊ณ ์๋ค.
'fill'์ 'white'๋ก ์ง์ ํด์ ์๋์ชฝ ์๋ฆฌ์ฆ ๋ถ๋ถ์ด ํ์๋์ง ์๋๋ค.
๋, ์ด ์ง์ฌ๊ฐํ๊ณผ ์ค๋ฅธ์ชฝ ์ ์ ์ฌ๊ฐํ์ x1, x2,
y1, y2๋ก ์์น์ ํฌ๊ธฐ๊ฐ ์ค์ ๋ผ์
์ฐจํธ inverted๋ฅผ true๋ก ์ง์ ํด๋ ์๋ ๊ทธ๋ฆผ์ฒ๋ผ ์์น๊ฐ ์ ์ง๋๋ค.
์ค์
'type'์ 'image'๋ก ์ง์ ํ๋ค.
anntations: [{
type: 'image',
shape: 'rectangle',
rotation: -20,
style: {
stroke: 'red',
strokeWidth: '3px'
}
}]
'type'์ ์ง์ ํ์ง ์๊ณ , shape์ ์ง์ ํ๋ฉด 'image'๋ก ์ง์ ํ ๊ฒ๊ณผ ๋์ผํ๋ค.
anntations: [{
imageUrl: '/images/chart.png',
}]