Class ChartOptions
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
차트옵션
높이, 색상 등 Chart
에 현재 구성된 옵션을 노출합니다.
사용 가능한 옵션에 관한 자세한 내용은 시각화 참조 문서를 참고하세요. 각 차트의 구체적인 옵션은 차트 갤러리에서 특정 차트를 클릭하여 확인할 수 있습니다.
이러한 옵션은 변경할 수 없습니다.
자세한 문서
get(option)
이 차트에 구성된 옵션을 반환합니다.
매개변수
이름 | 유형 | 설명 |
option | String | 원하는 옵션을 나타내는 문자열입니다. |
리턴
Object
: 지정된 옵션에 현재 설정된 값입니다. 옵션이 설정되지 않은 경우에는 null
입니다.
getOrDefault(option)
이 차트에 구성된 옵션을 반환합니다. 차트 옵션이 설정되지 않은 경우 사용 가능한 경우 이 옵션의 기본값을 반환하거나 기본값을 사용할 수 없는 경우 null
를 반환합니다.
매개변수
이름 | 유형 | 설명 |
option | String | 원하는 옵션을 나타내는 문자열입니다. |
리턴
Object
: 현재 지정된 옵션에 설정된 값입니다. 옵션이 설정되지 않았고 기본값을 사용할 수 있는 경우 기본값을 반환합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eChartOptions\u003c/code\u003e provides access to the configuration settings of a Chart, such as height and color, and these options cannot be changed once set.\u003c/p\u003e\n"],["\u003cp\u003eTo understand available options, refer to the visualization reference and chart gallery for specific chart details.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two methods: \u003ccode\u003eget(option)\u003c/code\u003e to retrieve a specific option's value, returning \u003ccode\u003enull\u003c/code\u003e if not set, and \u003ccode\u003egetOrDefault(option)\u003c/code\u003e which returns the option's value or its default if available, otherwise \u003ccode\u003enull\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class ChartOptions\n\nChartOptions\n\nExposes options currently configured for a [Chart](/apps-script/reference/charts/chart), such as height, color, etc.\n\nPlease see the [visualization\nreference](https://developers.google.com/chart/interactive/docs/customizing_charts) documentation for information on what options are available. Specific options for\neach chart can be found by clicking on the specific chart in the [chart gallery](https://developers.google.com/chart/interactive/docs/gallery).\n\nThese options are immutable. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------|-------------|---------------------------------------------|\n| [get(option)](#get(String)) | `Object` | Returns a configured option for this chart. |\n| [getOrDefault(option)](#getOrDefault(String)) | `Object` | Returns a configured option for this chart. |\n\nDetailed documentation\n----------------------\n\n### `get(option)`\n\nReturns a configured option for this chart.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|----------|---------------------------------------------|\n| `option` | `String` | The string representing the desired option. |\n\n#### Return\n\n\n`Object` --- The value currently set for the specified option or `null` if the option was not\nset.\n\n*** ** * ** ***\n\n### `get``Or``Default(option)`\n\nReturns a configured option for this chart. If the chart option is not set, returns the default\nvalue of this option if available, or returns `null` if the default value is not\navailable.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|----------|---------------------------------------------|\n| `option` | `String` | The string representing the desired option. |\n\n#### Return\n\n\n`Object` --- The value currently set for the specified option. If the option was not set and the\ndefault value is available, returns the default value."]]