Ignite UI for Web Components 선형 게이지 구성 요소를 사용하면 선형 게이지 형태로 데이터를 시각화할 수 있습니다. IgcLinearGaugeComponent는 값과 스케일 및 하나 이상의 범위를 비교한 간단하고 간결한 뷰를 제공합니다. 하나의 스케일, 하나의 눈금 표시 세트 및 하나의 레이블 세트를 지원합니다. 이 구성 요소에는 애니메이션 전환에 대한 기본 제공 지원도 있습니다. 이 애니메이션은 transitionDuration 속성을 설정하여 쉽게 사용자 정의할 수 있습니다. 선형 게이지 구성 요소의 기능에는 구성 가능한 방향 및 방향, 바늘과 같은 구성 가능한 시각적 요소 등이 있습니다.
<!DOCTYPE html><html><head><title>LinearGaugeAnimation</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><divclass="options horizontal"><buttonid="animationButton1"class="button1">Gauge Animation #1</button><buttonid="animationButton2"class="button2">Gauge Animation #2</button><buttonid="animationButton3"class="button3">Gauge Animation #3</button></div><igc-linear-gaugeid="gauge"height="80px"width="100%"minimum-value="0"maximum-value="100"value="50"interval="10"label-interval="10"label-extent="0.0"minorTick-endExtent="0.10"minorTick-start-extent="0.20"tick-start-extent="0.25"tick-end-extent="0.05"tick-stroke-thickness="2"needle-shape="Needle"needle-brush="#79797a"needle-outline="#79797a"scale-stroke-thickness"0"
scale-brush="#ffffff"scale-outline="#d3d3d3"backing-brush="#ffffff"backing-outline="#d1d1d1"backing-stroke-thickness="0" ><igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Like this sample? Get access to our complete Ignite UI for Web Components toolkit and start building your own apps in minutes. Download it for free.
<!DOCTYPE html><html><head><title>LinearGaugeNeedle</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"height="80px"width="100%"minimum-value="0"value="50"maximum-value="100"interval="10"is-needle-dragging-enabled="true"needle-shape="Custom"needle-brush="DodgerBlue"needle-outline="DodgerBlue"needle-stroke-thickness="1"needle-breadth="15"needle-inner-extent="0.35"needle-outer-extent="0.65"needle-outer-point-extent="0.8"needle-inner-point-extent="0.325"needle-inner-point-width="0"needle-outer-point-width="0.3"needle-inner-base-width="0"needle-outer-base-width="0.07" ></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
<!DOCTYPE html><html><head><title>LinearGaugeHighlightNeedle</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"height="80px"width="100%"minimum-value="0"maximum-value="100"value="75"interval="10"label-interval="10"label-extent="0.025"labels-pre-terminal="0"labels-post-initial="0"needle-brush="blue"highlight-value-display-mode="Overlay"highlight-value=25is-highlight-needle-dragging-enabled=true></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Ranges
범위는 눈금에서 지정된 값 범위를 강조 표시하는 시각적 요소입니다. 그 목적은 성능 막대 측정값의 질적 상태를 시각적으로 전달하는 동시에 해당 상태 내에 있는 정도를 보여주는 것입니다.
<!DOCTYPE html><html><head><title>LinearGaugeRanges</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"width="100%"height="80px"minimum-value="0"value="50"maximum-value="100"interval="10"rangeBrushes="#a4bd29, #F86232"rangeOutlines="#a4bd29, #F86232"><igc-linear-graph-rangename="range1"start-value="0"end-value="50"inner-start-extent="0.075"inner-end-extent="0.075"outer-start-extent="0.25"outer-end-extent="0.4" ></igc-linear-graph-range><igc-linear-graph-rangename="range2"start-value="50"end-value="100"inner-start-extent="0.075"inner-end-extent="0.075"outer-start-extent="0.4"outer-end-extent="0.55" ></igc-linear-graph-range></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Tick Marks
눈금 표시는 선형 게이지의 가독성을 높이기 위해 눈금을 간격으로 시각적으로 나누는 역할을 합니다.
주요 눈금 표시 – 주요 눈금 표시는 눈금의 기본 구분 기호로 사용됩니다. 나타나는 빈도, 범위 및 스타일은 해당 속성을 설정하여 제어할 수 있습니다.
보조 눈금 표시 – 보조 눈금 표시는 눈금의 가독성을 추가로 향상시키는 데 사용될 수 있고 주요 눈금과 유사한 방식으로 사용자 정의할 수 있는 보조 눈금 표시를 나타냅니다.
<!DOCTYPE html><html><head><title>LinearGaugeTickmarks</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"height="80px"width="100%"minimum-value="0"value="50"maximum-value="100"interval="10"tick-brush="DodgerBlue"ticks-pre-terminal="0"ticks-post-initial="0"tick-stroke-thickness="2"tick-start-extent="0.25"tick-end-extent="0.05"minor-tick-count="4"minor-tick-brush="DarkViolet"minor-tick-end-extent="0.05"minor-tick-start-extent="0.15"minor-tick-stroke-thickness="1"></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
<!DOCTYPE html><html><head><title>LinearGaugeLabels</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"height="80px"width="100%"minimum-value="0"value="50"maximum-value="100"interval="10"label-interval="10"label-extent="0.025"labels-pre-terminal="0"labels-post-initial="0"font-brush="DodgerBlue"font="11px Verdana" ></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Backing
뒷면 요소는 선형 게이지 구성 요소의 배경과 테두리를 나타냅니다. 이는 항상 렌더링되는 첫 번째 요소이며 레이블 및 눈금 표시와 같은 나머지 모든 요소는 그 위에 오버레이됩니다.
<!DOCTYPE html><html><head><title>LinearGaugeBacking</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"width="100%"height="80px"minimum-value="0"value="50"maximum-value="100"interval="10"backing-brush="#bddcfc"backing-outline="DodgerBlue"backing-stroke-thickness="4"backing-inner-extent="0"backing-outer-extent="1"></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Scale
눈금은 선형 게이지의 전체 값 범위를 강조하는 시각적 요소입니다. 눈금의 모양과 모양을 사용자 정의할 수 있습니다. isScaleInverted 속성을 사용하여 반전할 수도 있으며 모든 레이블은 왼쪽에서 오른쪽이 아닌 오른쪽에서 왼쪽으로 렌더링됩니다.
<!DOCTYPE html><html><head><title>LinearGaugeScale</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-linear-gaugeid="gauge"width="100%"height="80px"minimum-value="0"value="50"maximum-value="100"interval="10"is-scale-inverted="false"scale-brush="DodgerBlue"scale-outline="Red"scale-stroke-thickness="2"scale-inner-extent="0.05"scale-outer-extent="0.65"scale-start-extent="0.05"scale-end-extent="0.95" ></igc-linear-gauge></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Summary
편의를 위해 위의 모든 코드 조각은 아래의 하나의 코드 블록으로 결합되어 프로젝트에 쉽게 복사하고 모든 기능과 시각적 개체가 활성화된 선형 게이지를 볼 수 있습니다.