Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ui.Chart.image.series
Stay organized with collections
Save and categorize content based on your preferences.
Generates a Chart from an ImageCollection. Plots derived values of each band in a region across images. Usually a time series.
- X-axis: Image, labeled by xProperty value.
- Y-axis: Band value.
- Series: Band names.
Returns a chart.
Usage | Returns | ui.Chart.image.series(imageCollection, region, reducer, scale, xProperty) | ui.Chart |
Argument | Type | Details | imageCollection | ImageCollection | An ImageCollection with data to be included in the chart. |
region | Feature|FeatureCollection|Geometry | The region to reduce. |
reducer | Reducer, optional | Reducer that generates the values for the y-axis. Must return a single value. Defaults to ee.Reducer.mean(). |
scale | Number, optional | Scale to use with the reducer in meters. |
xProperty | String, optional | Property to be used as the label for each image on the x-axis. Defaults to 'system:time_start'. |
Examples
Code Editor (JavaScript)
// Define a region of pixels to reduce and chart a time series for.
var region = ee.Geometry.BBox(-121.916, 37.130, -121.844, 37.076);
// Define an image collection time series to chart, MODIS vegetation indices
// in this case.
var imgCol = ee.ImageCollection('MODIS/006/MOD13A1')
.filter(ee.Filter.date('2015-01-01', '2020-01-01'))
.select(['NDVI', 'EVI']);
// Define the chart and print it to the console.
var chart = ui.Chart.image.series({
imageCollection: imgCol,
region: region,
reducer: ee.Reducer.mean(),
scale: 500,
xProperty: 'system:time_start'
})
.setSeriesNames(['EVI', 'NDVI'])
.setOptions({
title: 'Average Vegetation Index Value by Date',
hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},
vAxis: {
title: 'Vegetation index (x1e4)',
titleTextStyle: {italic: false, bold: true}
},
lineWidth: 5,
colors: ['e37d05', '1d6b99'],
curveType: 'function'
});
print(chart);
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eGenerates a chart visualizing the change in pixel values within a specified region across an image collection, often used for time series analysis.\u003c/p\u003e\n"],["\u003cp\u003eThe chart displays band values on the y-axis, images (labeled by a chosen property) on the x-axis, and uses separate series for each band.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the chart by specifying the region, reducer, scale, and label property, with defaults provided for convenience.\u003c/p\u003e\n"],["\u003cp\u003eAn example using MODIS vegetation indices demonstrates the function's application in tracking vegetation changes over time.\u003c/p\u003e\n"]]],[],null,["# ui.Chart.image.series\n\n\u003cbr /\u003e\n\nGenerates a Chart from an ImageCollection. Plots derived values of each band in a region across images. Usually a time series.\n\n\u003cbr /\u003e\n\n- X-axis: Image, labeled by xProperty value.\n\n- Y-axis: Band value.\n\n- Series: Band names.\n\nReturns a chart.\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------------------|----------|\n| `ui.Chart.image.series(imageCollection, region, `*reducer* `, `*scale* `, `*xProperty*`)` | ui.Chart |\n\n| Argument | Type | Details |\n|-------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| `imageCollection` | ImageCollection | An ImageCollection with data to be included in the chart. |\n| `region` | Feature\\|FeatureCollection\\|Geometry | The region to reduce. |\n| `reducer` | Reducer, optional | Reducer that generates the values for the y-axis. Must return a single value. Defaults to ee.Reducer.mean(). |\n| `scale` | Number, optional | Scale to use with the reducer in meters. |\n| `xProperty` | String, optional | Property to be used as the label for each image on the x-axis. Defaults to 'system:time_start'. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Define a region of pixels to reduce and chart a time series for.\nvar region = ee.Geometry.BBox(-121.916, 37.130, -121.844, 37.076);\n\n// Define an image collection time series to chart, MODIS vegetation indices\n// in this case.\nvar imgCol = ee.ImageCollection('MODIS/006/MOD13A1')\n .filter(ee.Filter.date('2015-01-01', '2020-01-01'))\n .select(['NDVI', 'EVI']);\n\n// Define the chart and print it to the console.\nvar chart = ui.Chart.image.series({\n imageCollection: imgCol,\n region: region,\n reducer: ee.Reducer.mean(),\n scale: 500,\n xProperty: 'system:time_start'\n})\n.setSeriesNames(['EVI', 'NDVI'])\n.setOptions({\n title: 'Average Vegetation Index Value by Date',\n hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},\n vAxis: {\n title: 'Vegetation index (x1e4)',\n titleTextStyle: {italic: false, bold: true}\n },\n lineWidth: 5,\n colors: ['e37d05', '1d6b99'],\n curveType: 'function'\n});\nprint(chart);\n```"]]