ui.Chart.setOptions
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Legt Optionen zum Formatieren dieses Diagramms fest.
Gibt dieses Diagramm zurück.
Nutzung | Ausgabe |
---|
Chart.setOptions(options) | ui.Chart |
Argument | Typ | Details |
---|
So gehts: ui.chart | ui.Chart | Die ui.Chart-Instanz. |
options | Objekt | Ein Objekt, das Optionen für den Diagrammstil definiert, z. B.:
title (String): Der Titel des Diagramms. |
colors (Array) Ein Array mit Farben, die zum Zeichnen des Diagramms verwendet werden. |
Das Format sollte den Optionen der Google Visualization API entsprechen: https://developers.google.com/chart/interactive/docs/customizing_charts |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\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 |"]]