RcAnnotation
Extends
์ด๋ ธํ ์ด์ ๋ชจ๋ธ.
Config Properties
Name | Type | Description |
---|---|---|
align | 'center'|'left'|'right' | ์ํ ๋ฐฐ์น. |
anchor | string | ์ด๋ ธํ ์ด์ ๋ฐฐ์น ๊ธฐ์ค์ด ๋๋ ์ฐจํธ ๊ตฌ์ฑ ์์. |
backgroundStyle | SVGStyles | string | ๋ฐฐ๊ฒฝ ์คํ์ผ. |
front | boolean | true๋ก ์ง์ ํ๋ฉด ์๋ฆฌ์ฆ๋ค ์์ ํ์๋๋ค. |
height | string | number | Annotation ๋์ด. |
name | string | ์ด๋ ธํ ์ด์ ์ด๋ฆ. |
noClip | boolean | true๋ก ์ง์ ํ๋ฉด ์์ ์์ญ์ ๋ฒ์ด๋ ๋ถ๋ถ๋ ํ์๋๊ฒ ํ๋ค. |
offsetX | string | number | align ๊ณผ verticalAlign ์ผ๋ก ์ง์ ๋ ์์น์์ ์ค์ ํ์๋ ์์น์ ์ํ ๊ฐ๊ฒฉ. |
offsetY | string | number | align ๊ณผ verticalAlign ์ผ๋ก ์ง์ ๋ ์์น์์ ์ค์ ํ์๋ ์์น์ ์์ง ๊ฐ๊ฒฉ. |
rotation | number | ํ์ ๊ฐ๋. |
scope | 'chart'|'container' | ์ด๋ ธํ ์ด์ ๋ฐฐ์น ๊ธฐ์ค. |
style | SVGStyles | string | ์คํ์ผ์ ํน์ class selector. |
verticalAlign | 'bottom'|'middle'|'top' | ์์ง ๋ฐฐ์น. |
visible | boolean | ํ์ ์ฌ๋ถ. |
width | string | number | Annotation ๋๋น. |
x1 | number | Date | body ์ด๋ ธํ ์ด์ ์ผ ๊ฒฝ์ฐ, x ์ถ์ ๊ธฐ์ค์ผ๋ก ์ง์ ํ๋ ์ํ(inverted์ผ ๋ ์์ง) ์์น. |
x2 | number | Date | body ์ด๋ ธํ ์ด์ ์ผ ๊ฒฝ์ฐ, x ์ถ์ ๊ธฐ์ค์ผ๋ก ์ง์ ํ๋ ์ํ(inverted์ผ ๋ ์์ง) ์์น. |
y1 | number | Date | body ์ด๋ ธํ ์ด์ ์ผ ๊ฒฝ์ฐ, y ์ถ์ ๊ธฐ์ค์ผ๋ก ์ง์ ํ๋ ์์ง(inverted์ผ ๋ ์ํ) ์์น. |
y2 | number | Date | body ์ด๋ ธํ ์ด์ ์ผ ๊ฒฝ์ฐ, y ์ถ์ ๊ธฐ์ค์ผ๋ก ์ง์ ํ๋ ์์ง(inverted์ผ ๋ ์ํ) ์์น. |
Properties
name: string (opens in a new tab)
config์์ ์ค์ ํด๋ name์ ๋ฆฌํดํ๋ค.
์ต์ด ์ค์ ํ ์ด๋ฆ์ ๋ณ๊ฒฝํ ์ ์๋ค.
Methods
get(prop): any (opens in a new tab)
์ง์ ํ ์ค์ ๊ฐ(๋ค)์ ๊ฐ์ ธ์จ๋ค.
์ง์ ๊ฐ๋ฅํ ์ค์ ๊ฐ ๋ชฉ๋ก์ Configuration API ํ์ด์ง์์ ํ์ธํ ์ ์๋ค.
Utils.log(chart.series.get('name'))
ํ์ ๊ฐ์ฒด์ ์ค์ ์์ฑ์ ์์ฑ ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ ์ง์ ๊ฐ์ ธ์ฌ ์๋ ์๋ค.
Utils.log(chart.axis.get('title.text'));
์์ฑ ๋ณ๊ฒฝ์ set, setAll, toggle๋ฑ์ผ๋ก ์คํํ๋ค.
Parameter | Type | Description |
---|---|---|
prop | string (opens in a new tab) | '.'์ผ๋ก ๊ตฌ๋ถ๋๋ ์์ฑ ๊ฒฝ๋ก. |
set(prop, value, redraw): RcChartObject
์ง์ ํ ์์ฑ์ ๊ฐ(๋ค)์ ์ค์ ํ๋ค.
์ง์ ๊ฐ๋ฅํ ์ค์ ๊ฐ ๋ชฉ๋ก์ Configuration API ํ์ด์ง์์ ํ์ธํ ์ ์๋ค.
๋, ์ด ๊ฐ์ฒด ์์ ์ ๋ฆฌํดํ๋ฏ๋ก javascript์์ builder ํจํด์ผ๋ก ์ค์ ๊ฐ๋ค์ ์ฐ์ํด์ ์ง์ ํ ์ ์๋ค.
chart.series.set('xAxis', 1).set('yAxis', 1);
get์์์ ๋ง์ฐฌ๊ฐ์ง๋ก ํ์ ๊ฐ์ฒด์ ์ค์ ์์ฑ์ ์์ฑ ๊ฒฝ๋ก๋ฅผ ํตํด ์ง์ ์ค์ ํ ์๋ ์๋ค.
chart.axis.set('title.text', 'New Title'));
Parameter | Type | Description |
---|---|---|
prop | string (opens in a new tab) | ์ค์ ์์ฑ ๊ฒฝ๋ก ๋ฌธ์์ด |
value | any (opens in a new tab) | ์ง์ ํ ๊ฐ(๋ค) |
redraw=true | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด chart๋ฅผ ๋ค์ ๊ทธ๋ฆฐ๋ค. false๋ก ์ง์ ํ๊ณ ์ฌ๋ฌ ์ค์ ํ์ render๋ฅผ ํธ์ถํด์ ๋ค์ ๊ทธ๋ฆฌ๊ฒ ํ ์๋ ์๋ค. |
setAll(props, redraw): RcChartObject
JSON ๊ฐ์ฒด๋ก ์ง์ ํ ์์ฑ๋ค์ ๊ฐ์ ์ค์ ํ๋ค.
์ง์ ๊ฐ๋ฅํ ์ค์ ๊ฐ ๋ชฉ๋ก์ Configuration API ํ์ด์ง์์ ํ์ธํ ์ ์๋ค.
chart.series.set({
xAxis: 1,
yAxis: 1,
yField: 'salary'
});
Parameter | Type | Description |
---|---|---|
props | object (opens in a new tab) | ์ฌ๋ฌ ์ค์ ๊ฐ๋ค์ด ์ง์ ๋ JSON ๊ฐ์ฒด |
redraw=true | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด chart๋ฅผ ๋ค์ ๊ทธ๋ฆฐ๋ค. false๋ก ์ง์ ํ๊ณ ์ฌ๋ฌ ์ค์ ํ์ render๋ฅผ ํธ์ถํด์ ๋ค์ ๊ทธ๋ฆฌ๊ฒ ํ ์๋ ์๋ค. |
toggle(prop, redraw): RcChartObject
Boolean ํ์
์ ์ค์ ๊ฐ์ ๋ณ๊ฒฝํ๋ค.
์ง์ ๊ฐ๋ฅํ ์ค์ ๊ฐ ๋ชฉ๋ก์ Configuration API ํ์ด์ง์์ ํ์ธํ ์ ์๋ค.
chart.getSeries('ser02').toggle('visible');
Parameter | Type | Description |
---|---|---|
prop | string (opens in a new tab) | ์ค์ ์์ฑ ์ด๋ฆ |
redraw=true | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด chart๋ฅผ ๋ค์ ๊ทธ๋ฆฐ๋ค. false๋ก ์ง์ ํ๊ณ ์ฌ๋ฌ ์ค์ ํ์ render๋ฅผ ํธ์ถํด์ ๋ค์ ๊ทธ๋ฆฌ๊ฒ ํ ์๋ ์๋ค. |