📋
XDWorld_WebGL_Manual
  • 소개
    • XDWorld API
    • 시작하기
    • About EGIS
    • Release Note
      • 2.1x 버전 업데이트
      • 2.x 버전 업데이트
      • 1.6x 버전 업데이트
      • 1.5x 버전 업데이트
      • 1.4x 버전 업데이트
      • 1.3x 버전 업데이트
      • 이전 버전 업데이트
    • Tutorial
      • 카메라 설정
      • POI 생성하기
      • 폴리곤 생성하기
      • 라인 생성하기
      • 모델 추가하기
      • 레이어 설정
      • 배경 지도 설정
      • 거리 측정
      • 면적 측정
      • 높이 측정
      • 반경 측정
  • API
    • Module
    • Core
      • Collection
      • JSAABBox3D
      • JSColor
      • JSLine3D
      • JSSize2D
      • JSSize3D
      • JSVector2D
      • JSVector3D
      • JSVec2Array
      • JSVec3Array
      • JSDateTime
    • Analysis
      • JSAnalysis
      • JSAnalysisGridShadow
      • JSEarthquake
      • JSEditTerrain
      • JSFlood
      • JSGridAnal
      • JSSightAnalysis
      • JSSlope
      • JSTransparency
      • JSSolarManager
    • Camera
      • JSCamera
    • Layer
      • JSLayer
      • JSLayerList
      • JSImageryProvider
    • Map
      • JSMap
      • JSTerrain
      • JSIndexMap
    • Object
      • JSObject
      • JSAntenna
      • JSArrow
      • JSBarGraph
      • JSBarGraph3D
      • JSBillboard
      • JSColorGrid
      • JSColorGrid3D
      • JSColorPolygon
      • JSFigure
      • JSFlow
      • JSFlowPolygon
      • JSGhostSymbol
      • JSGhostSymbolMap
      • JSHTMLObject
      • JSIcon
      • JSInstanceObject
      • JSLineString
      • JSMultiCube
      • JSMultiPoint
      • JSPipe
      • JSPoint
      • JSPointGraph
      • JSPolygon
      • JSPolygonStyle
      • JSPolyLineStyle
      • JSReal3D
      • JSSurfaceGraph
      • JSSymbol
      • JSTimeSeriesObject
      • JSTraceTarget
      • JSTyphoon
      • JSVideoObject
      • JSViewFrustum
    • Option
      • JSControl
      • JSNavigationControl
      • JSOption
    • ETC
      • JSMath
      • JSProj
      • ~~JSProjection~~
      • SOPObject
      • EVENT
      • Type List
      • Tag List
Powered by GitBook
On this page
  • Function
  • getId() → string
  • create(position, size, type) → boolean
  • restartAnimation(restartRate) → boolean
  • setValueRange(min, max, interval) → boolean
  • setAnimationSpeed(speed) → boolean
  • setFloorColor(color) → boolean
  • setLegendBoxSize(size) → boolean
  • setUnitText(text) → boolean
  • setGridVisible(type) → boolean
  • insertLegend(name, label, color) → boolean
  • insertDataSet(name, data) → boolean
  • setDataSetNameFont(name, font) → boolean
  • setDataSetNameTextSize(name, size) → boolean
  • setDataSetNameTextColor(name, textcolor, textOutlineColor) → boolean
  • setDataSetNameInterval(value) → boolean
  • setFloorDepth(value) → boolean
  • Getter / Setter
  • getDescription(), setDescription(desc) → string
  • getName(), setName(name) → string
  • getVisible(), setVisible(visible) → boolean

Was this helpful?

  1. API
  2. Object

JSBarGraph

지도 내 2차원 막대 그래프 객체를 생성 및 설정하기 위한 API 입니다.

PreviousJSArrowNextJSBarGraph3D

Last updated 12 months ago

Was this helpful?

Module.createBarGraph() API를 생성합니다.

var object = Module.createBarGraph("ID");

Function

getId() → string

객체의 고유 명칭을 반환 합니다.

  • Return

    • string: 객체 설명 문자열이 성공적으로 반환.

    • null: 객체가 null인 경우.

var strKey = object.getId();

create(position, size, type) → boolean

2차원 막대 그래프 객체를 생성합니다.

입력 변수값(type)에 따른 시각화 방법이 변경됩니다.

  • 0: 수평 그래프 형태.

  • 1: 수직 그래프 형태.

Name
Type
Description

position

그래프 생성 좌표 (경도, 위도, 고도) 기준은 중하단.

size

크기(너비, 높이 설정).

type

number

그래프 타입 설정.

  • Return

    • true : 생성 성공.

    • false : 생성 실패.

  • Sample

    • the createGraph function 참조.

restartAnimation(restartRate) → boolean

그래프 애니메이션을 다시 실행합니다.

Name
Type
Description

restartRate

number

애니메이션 시작 위치 설정 0.0: 애니메이션 시작 위치. 1.0: 애니메이션 끝 위치.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

var graph = Module.createBarGraph("Graph");
//...
graph.restartAnimation(0.5);

setValueRange(min, max, interval) → boolean

그래프 Y축 범위를 설정합니다.

Name
Type
Description

min

number

그래프 Y축 최소 값.

max

number

그래프 Y축 최대 값.

interval

number

그래프 격자 간격.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setAnimationSpeed(speed) → boolean

그래프 애니메이션 실행 속도를 설정합니다.

입력 변수값(speed)는 0.1 ~ 1.0 사이 값을 가지며 1.0 가까울 수록 빠르게 재생합니다..

Name
Type
Description

speed

number

그래프 애니메이션 실행 속도

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setFloorColor(color) → boolean

그래프 바닥 평면 색상을 설정합니다.

Name
Type
Description

color

색상.

  • Return

    • true : 설정 설공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setLegendBoxSize(size) → boolean

범례 색상 표시 박스 크기를 설정합니다.

Name
Type
Description

size

박스 크기.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setUnitText(text) → boolean

그래프 Y축에 해당되는 범례(단위)에 대한 문자열을 설정합니다.

Name
Type
Description

text

string

단위 문자열.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setGridVisible(type) → boolean

그래프 Y축과 격자를 가시화 유무 설정 합니다..

| Name | Type | Description | | :--- | :------ | :--------------------------------------------------------------------- | --- | | type | boolean |

true인 경우 Y축 격자 가시화(RTT) false인 경우 Y축 격자 숨김.

| |

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

insertLegend(name, label, color) → boolean

그래프 범례를 추가합니다.

Name
Type
Description

name

string

그래프 범례 그룹 명칭.

label

string

그래프 범례 명칭.

color

그래프 범례 색상.

  • Return

    • true: 추가 성공.

    • false: 추가 실패.

  • Sample

    • the createGraph function 참조.

var graph = Module.createBarGraph("Graph");
graph.insertLegend("Legend1", "Gas", new Module.JSColor(200, 255, 0, 0));
graph.insertLegend("Legend2", "Electricity", new Module.JSColor(200, 255, 255, 0));
graph.insertLegend("Legend3", "Water", new Module.JSColor(200, 0, 0, 255));
graph.insertLegend("Legend4", "Others", new Module.JSColor(200, 255, 255, 255));

insertDataSet(name, data) → boolean

그래프 데이터 셋을 추가합니다.

Name
Type
Description

name

string

데이터 셋 명칭 (그래프 하단 텍스트 출력).

data

데이터 값 리스트 (범례 추가 순서를 따르며, 범례와 1:1 대응).

  • Return

    • true: 추가 성공.

    • false: 추가 실패.

  • Sample

    • the createGraph function 참조.

var graph = Module.createBarGraph("Graph");

var dataValue = [10.5, 50.1, 97.0, 11.6, 34.9];
var data = new Module.Collection();

for (var i = 0, len = dataValue.length; i < len; i++) {
    data.add(dataValue[i]);
}

graph.insertDataSet("2010", data);

setDataSetNameFont(name, font) → boolean

데이터 셋 가시화 문자열에 적용할 폰트를 설정합니다.

Name
Type
Description

name

string

데이터 셋 이름.

font

string

폰트 이름.

  • Return

    • true : Font setting successful.

    • false : Font setting failed.

  • Sample

    • the createGraph function 참조.

setDataSetNameTextSize(name, size) → boolean

데이터 셋 가시화 문자열에 적용할 폰트 크기를 설정합니다.

Name
Type
Description

name

string

데이터 셋 이름.

size

number

폰트 크기.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setDataSetNameTextColor(name, textcolor, textOutlineColor) → boolean

데이터 셋 가시화 문자열에 적용할 폰트 색상을 설정합니다.

Name
Type
Description

name

string

데이터 셋 이름.

textcolor

텍스트 채움 색상.

textOutlineColor

텍스트 외곽 색상.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setDataSetNameInterval(value) → boolean

그래프 화면과 필드 이름 텍스트 간 간격을 설정합니다.

Name
Type
Description

value

number

그래프 화면과 필드 이름 텍스트 간 간격.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

setFloorDepth(value) → boolean

그래프 바닥 평면 세로방향 너비를 설정합니다.

Name
Type
Description

value

number

너비.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the createGraph function 참조.

Getter / Setter

getDescription(), setDescription(desc) → string

객체에 대한 설명을 설정합니다.

Name
Type
Description

desc

string

설명 문자열.

  • Return

    • string: 객체 설명 문자열이 성공적으로 반환.

    • null: 객체가 null인 경우.

var strDesc = object.getDescription();
// ... or ...
object.setDescription("First Object.");

getName(), setName(name) → string

객체 이름을 설정합니다.

Name
Type
Description

name

string

객체 이름.

  • Return

    • string: 객체 이름을 성공적을 반환

    • null: 객체가 null인 경우.

var objName = object.getName();
// ... or ...
object.setName("MyObject");

getVisible(), setVisible(visible) → boolean

객체의 가시화 유무를 설정합니다.

Name
Type
Description

visible

boolean

true: 객체 가시화. false: 객체 비가시화.

  • Return

    • true: 객체 가시화 상태.

    • false: 객체 비가시화 상태.

var objName = object.getName();
// ... or ...
object.setVisible(true);

Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
Sandbox_2D Bar Graph
JSVector3D
JSSize2D
JSColor
JSSize3D
JSColor
Collection
JSColor
JSColor