Earth Engine presenta
niveles de cuotas no comerciales para proteger los recursos de procesamiento compartidos y garantizar un rendimiento confiable para todos. Los proyectos no comerciales usan el nivel de la comunidad de forma predeterminada, aunque puedes cambiar el nivel de un proyecto en cualquier momento.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ui.Chart.setChartType
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Establece el valor de chartType de este gráfico.
Devuelve este gráfico.
| Uso | Muestra |
|---|
Chart.setChartType(chartType) | ui.Chart |
| Argumento | Tipo | Detalles |
|---|
esta: ui.chart | ui.Chart | Es la instancia de ui.Chart. |
chartType | String | Es el tipo de gráfico, p. ej., "ScatterChart", "LineChart" y "ColumnChart". Para ver la lista completa de gráficos, consulta https://developers.google.com/chart/interactive/docs/gallery. |
Ejemplos
Editor de código (JavaScript)
// A data table of population for selected states.
var dataTable = [
[{role: 'domain', label: 'State'}, {role: 'data', label: 'Population'}],
['CA', 37253956],
['NY', 19378102],
['IL', 12830632],
['MI', 9883640],
['OR', 3831074],
];
// Chart the data using accepted chart types.
print('Scatter chart', ui.Chart(dataTable).setChartType('ScatterChart'));
print('Line chart', ui.Chart(dataTable).setChartType('LineChart'));
print('Column chart', ui.Chart(dataTable).setChartType('ColumnChart'));
print('Bar chart', ui.Chart(dataTable).setChartType('BarChart'));
print('Pie chart', ui.Chart(dataTable).setChartType('PieChart'));
print('Area chart', ui.Chart(dataTable).setChartType('AreaChart'));
print('Table', ui.Chart(dataTable).setChartType('Table'));
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-26 (UTC)
[null,null,["Última actualización: 2025-07-26 (UTC)"],[],["The `setChartType` method sets the type of a `ui.Chart` instance and returns the modified chart. It accepts a string argument (`chartType`) that specifies the desired chart type, such as 'ScatterChart', 'LineChart', or 'ColumnChart'. A data table is used to exemplify different chart types. Various chart examples include scatter, line, column, bar, pie, area and tables, and the complete list of chart types is found in the provided url.\n"]]