RcChartControl
RealChart ์ปจํธ๋กค.
Properties
body: RcBody
์ฐจํธ ์๋ฆฌ์ฆ, ๊ฒ์ด์ง, annotation๋ค์ด ๊ทธ๋ ค์ง๋ plotting ์์ญ ๋ชจ๋ธ.
gauge: RcChartGauge
์ฒซ๋ฒ์งธ ๊ฒ์ด์ง.
<readonly>
gaugeType: string (opens in a new tab)
๊ธฐ๋ณธ ๊ฒ์ด์ง ์ข
๋ฅ.
๊ฒ์ด์ง์ type์ ์ง์ ํ์ง ์์ผ๋ฉด ์ด ์์ฑ type์ ์๋ฆฌ์ฆ๋ก ์์ฑ๋๋ค.
<readonly>
inverted: boolean (opens in a new tab)
true๋ฉด x์ถ๊ณผ y์ถ์ ๋ค๋ฐ๊ฟ ํ์ํ๋ค.
์ฆ, true๋ฉด x์ถ์ด ์์ง, y์ถ์ด ์ํ์ผ๋ก ๋ฐฐ์น๋๋ค.
legend: RcLegend
์ฐจํธ ๋ฒ๋ก ๋ชจ๋ธ.
<readonly>
polar: boolean (opens in a new tab)
true๋ฉด ์ฐจํธ๊ฐ ๊ทน์ขํ๊ณ๋ก ํ์๋๋ค. ๊ธฐ๋ณธ์ ์ง๊ต์ขํ๊ณ์ด๋ค. ๊ทน์ขํ๊ณ์ผ ๋, x์ถ์ด ์ํธ์, y์ถ์ ๋ฐฉ์ฌ์ ์ ์์นํ๊ณ , ์๋์ ์ ํ ์ฌํญ์ด ์๋ค.
- x์ถ์ ์ฒซ๋ฒ์งธ ์ถ ํ๋๋ง ์ฌ์ฉ๋๋ค.
- axis.position ์์ฑ์ ๋ฌด์๋๋ค.
- chart, series์ inverted ์์ฑ์ด ๋ฌด์๋๋ค.
- ๊ทน์ขํ๊ณ์ ํ์ํ ์ ์๋ series๋ค์ ํ์๋์ง ์๋๋ค.
series: RcChartSeries
์ฐจํธ์ ์ค์ ๋ ์ฒซ๋ฒ์งธ ์๋ฆฌ์ฆ.
์๋ฆฌ์ฆ ๊ฐ์ ๋ฐ
์๋ฆฌ์ฆ ์ค์ ์ ์ฐธ์กฐํ๋ค.
subtitle: RcSubtitle
์ฐจํธ ๋ถ์ ๋ชฉ ๋ชจ๋ธ.
title: RcTitle
์ฐจํธ ํ์ดํ ๋ชจ๋ธ.
<readonly>
type: string (opens in a new tab)
๊ธฐ๋ณธ ์๋ฆฌ์ฆ ์ข
๋ฅ.
์๋ฆฌ์ฆ์ type์ ์ง์ ํ์ง ์์ผ๋ฉด ์ด ์์ฑ type์ ์๋ฆฌ์ฆ๋ก ์์ฑ๋๋ค.
xAxis: RcChartAxis
์ฒซ๋ฒ์งธ x ์ถ.
yAxis: RcChartAxis
์ฒซ๋ฒ์งธ y ์ถ.
Methods
addSeries(source, animate): RcChartSeries
์๋ฆฌ์ฆ๋ฅผ ์ถ๊ฐํ๋ค.
Parameter | Type | Description |
---|---|---|
source | any (opens in a new tab) | ์๋ฆฌ์ฆ ์ค์ json. |
animate=true | boolean (opens in a new tab) | ์ ๋๋ฉ์ด์ ์คํ ์ฌ๋ถ. |
destroy(): void (opens in a new tab)
์ฐจํธ SVG๋ฅผ ๋ถ๋ชจ div์์ ์ ๊ฑฐํ๊ณ ๊ด๋ จ ๋ชจ๋ธ๋ค๋ ์ ๊ฑฐํ๋ค.
์ด ํ๋ก๋ ๊ธฐ์กด ์ปจํธ๋กค์ ์ฌ์ฉํ ์ ์๋ค.
export(options): void (opens in a new tab)
ํ์ฌ ํ์ ์ค์ธ ์ฐจํธ๋ฅผ PNG, JPG ๋๋ SVG ๋ฒกํฐ ์ด๋ฏธ์ง๋ก ๋ค์ด๋ก๋ํ๋ค.
chart.export({
type: 'png',
fileName: 'realchart'
})
Parameter | Type |
---|---|
options | IRcExportOptions |
getAnnotation(name): RcAnnotation
Annotation ์ด๋ฆ์ ํด๋นํ๋ Annotation ๊ฐ์ฒด๋ฅผ ๋ฆฌํดํ๋ค.
Parameter | Type | Description |
---|---|---|
name | string (opens in a new tab) | Annotation ์ด๋ฆ |
getGauge(name): RcChartGauge
๊ฒ์ด์ง ์ด๋ฆ์ ํด๋นํ๋ ๊ฒ์ด์ง ๊ฐ์ฒด๋ฅผ ๋ฆฌํดํ๋ค.
Parameter | Type | Description |
---|---|---|
name | string (opens in a new tab) | ๊ฒ์ด์ง ์ด๋ฆ |
getSeries(name): RcChartSeries
์๋ฆฌ์ฆ ์ด๋ฆ์ ํด๋นํ๋ ์๋ฆฌ์ฆ ๊ฐ์ฒด๋ฅผ ๋ฆฌํดํ๋ค.
Parameter | Type | Description |
---|---|---|
name | string (opens in a new tab) | ์๋ฆฌ์ฆ ์ด๋ฆ |
getXAxis(name): RcChartAxis
name ๋งค๊ฐ๋ณ์๊ฐ ๋ฌธ์์ด์ด๋ฉด ์ง์ ํ ์ด๋ฆ์ x ์ถ์, ์ซ์์ด๋ฉด ํด๋น index์ ์์นํ๋ x ์ถ์ ๋ฆฌํดํ๋ค.
Parameter | Type | Description |
---|---|---|
name | string (opens in a new tab) | number (opens in a new tab) | ์ด๋ฆ์ด๋ index |
getYAxis(name): RcChartAxis
name ๋งค๊ฐ๋ณ์๊ฐ ๋ฌธ์์ด์ด๋ฉด ์ง์ ํ ์ด๋ฆ์ y ์ถ์, ์ซ์์ด๋ฉด ํด๋น index์ ์์นํ๋ y ์ถ์ ๋ฆฌํดํ๋ค.
Parameter | Type | Description |
---|---|---|
name | string (opens in a new tab) | number (opens in a new tab) | ์ด๋ฆ์ด๋ index |
load(config, animate?, callback?): RcChartControl
๊ธฐ์กด ์ค์ ๋ชจ๋ธ์ ์ ๊ฑฐํ๊ณ ์๋ก์ด ์ค์ ์ผ๋ก ์ฐจํธ๋ฅผ ์ฌ๊ตฌ์ฑํ๋ค.
Parameter | Type |
---|---|
config | any (opens in a new tab) |
animate | boolean (opens in a new tab) |
callback | ( | ...args | unknown (opens in a new tab) | [ | ] | ) | | => | | void (opens in a new tab) |
removeSeries(series, animate): RcChartSeries
Parameter | Type |
---|---|
series | string (opens in a new tab) | RcChartSeries |
animate=true | boolean (opens in a new tab) |
render(): void (opens in a new tab)
๋ค์ rendering frame์ ๊ธฐ๋ค๋ฆฌ์ง ์๊ณ , ์ฐจํธ๋ฅผ ์ฆ์ ๋ค์ ๊ทธ๋ฆฐ๋ค.
์ฐจํธ rendering ์์
์ ์์ ์๋ชจ๊ฐ ๋ง๊ณ ์์ฉ ์๊ฐ๋ ์ ์ง ์์ผ๋ฏ๋ก,
data๋ ์ฌ๋ฌ ๋ชจ๋ธ์ ์์ ํ๋ ๊ฒฝ์ฐ ๋ชจ๋ ์์
์ด ์๋ฃ๋ ํ ํ ๋ฒ ํธ์ถํด์ผ ํ๋ค.
๊ฐ๋ฅํ๋ฉด ์ด ํจ์๋ ํธ์ถํ์ง ์๊ณ
์ฐจํธ ๊ธฐ๋ณธ ๋์(๋ค์ frame์ ์ด์ ๋ณ๊ฒฝ ์ฌํญ๋ค์ ๋ชจ์์ ํ ๋ฒ rendering)์ผ๋ก ์คํ๋๊ฒ ํด์ผ ํ๋ค.
setParam(param, value, redraw?): void (opens in a new tab)
Parameter | Type |
---|---|
param | string (opens in a new tab) |
value | any (opens in a new tab) |
redraw | boolean (opens in a new tab) |