公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ui.Chart.setOptions
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设置用于设置此图表样式的选项。
返回此图表。
用法 | 返回 |
---|
Chart.setOptions(options) | ui.Chart |
参数 | 类型 | 详细信息 |
---|
此:ui.chart | ui.Chart | ui.Chart 实例。 |
options | 对象 | 一个用于定义图表样式选项的对象,例如:
title (字符串)图表的标题。 |
colors (数组)用于绘制图表的颜色数组。 |
其格式应遵循 Google Visualization API 的选项:https://developers.google.com/chart/interactive/docs/customizing_charts |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003esetOptions\u003c/code\u003e is used to customize the appearance of a chart, such as its title and colors.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts an \u003ccode\u003eoptions\u003c/code\u003e object to specify these customizations, aligning with Google Visualization API's options format.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003esetOptions\u003c/code\u003e on a \u003ccode\u003eui.Chart\u003c/code\u003e instance returns the chart itself, allowing for method chaining.\u003c/p\u003e\n"]]],[],null,["# ui.Chart.setOptions\n\n\u003cbr /\u003e\n\nSets options used to style this chart.\n\n\u003cbr /\u003e\n\nReturns this chart.\n\n| Usage | Returns |\n|-----------------------------|----------|\n| Chart.setOptions`(options)` | ui.Chart |\n\n| Argument | Type | Details |\n|------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.chart` | ui.Chart | The ui.Chart instance. |\n| `options` | Object | An object defining chart style options such as: |---------------------------------------------------------------| | ` title ` (string) The title of the chart. | | ` colors ` (Array) An array of colors used to draw the chart. | Its format should follow the Google Visualization API's options: https://developers.google.com/chart/interactive/docs/customizing_charts |"]]