公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ui.Chart.setSeriesNames
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回此图表的副本,其中包含更新后的序列名称。
用法 | 返回 |
---|
Chart.setSeriesNames(seriesNames, seriesIndex) | ui.Chart |
参数 | 类型 | 详细信息 |
---|
此:ui.chart | ui.Chart | ui.Chart 实例。 |
seriesNames | 字典|Dictionary<String>|列表|List<String>|字符串 | 新系列名称。如果为字符串,则将 seriesIndex 处的系列名称设置为 seriesNames。如果它是列表,则列表中的索引 i 处的值将用作序列号 i 的标签。如果是字典或对象,则将其视为从现有序列名称到新序列名称的映射。在后两种情况下,系统会忽略 seriesIndex。 |
seriesIndex | 数字,可选 | 要重命名的序列的索引。如果 seriesNames 是列表或字典,则忽略此参数。系列从 0 开始编制索引。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],["The `Chart.setSeriesNames` function updates series names within a chart. It accepts `seriesNames` as either a string, list, or dictionary. A string renames a specific series by `seriesIndex`. A list sets series names based on their index. A dictionary maps existing series names to new ones. The function returns a new chart (`ui.Chart`) with the updated series names, leaving the original chart untouched. The `seriesIndex` argument is used only when a single string is passed to `seriesNames`.\n"],null,[]]