Class ChartOptions
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
グラフのオプション
Chart
に現在構成されているオプション(高さ、色など)を公開します。
使用可能なオプションについては、ビジュアリゼーション リファレンスのドキュメントをご覧ください。各グラフの特定のオプションは、グラフ ギャラリーで特定のグラフをクリックすると表示されます。
これらのオプションは変更できません。
詳細なドキュメント
get(option)
このグラフに構成されたオプションを返します。
パラメータ
名前 | 型 | 説明 |
option | String | 目的のオプションを表す文字列。 |
戻る
Object
- 指定されたオプションに現在設定されている値。オプションが設定されていない場合は null
です。
getOrDefault(option)
このグラフに構成されたオプションを返します。グラフ オプションが設定されていない場合、このオプションのデフォルト値が使用可能な場合はその値を返します。デフォルト値を使用できない場合は null
を返します。
パラメータ
名前 | 型 | 説明 |
option | String | 目的のオプションを表す文字列。 |
戻る
Object
- 指定されたオプションに現在設定されている値。オプションが設定されておらず、デフォルト値が使用可能な場合は、デフォルト値を返します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は 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."]]