ui.Chart.image.series

Tạo Biểu đồ từ ImageCollection. Vẽ các giá trị phái sinh của từng dải trong một khu vực trên các hình ảnh. Thường là một chuỗi thời gian.

  – Trục x: Hình ảnh, được gắn nhãn theo giá trị xProperty.

  – Trục Y: Giá trị dải.

  – Bộ sách: Tên ban nhạc.

Trả về một biểu đồ.

Cách sử dụngGiá trị trả về
ui.Chart.image.series(imageCollection, region, reducer, scale, xProperty)ui.Chart
Đối sốLoạiThông tin chi tiết
imageCollectionImageCollectionMột ImageCollection có dữ liệu sẽ được đưa vào biểu đồ.
regionFeature|FeatureCollection|GeometryKhu vực cần giảm.
reducerTấm dốc, không bắt buộcGiảm số lượng giá trị được tạo cho trục y. Phải trả về một giá trị duy nhất. Giá trị mặc định là ee.Reducer.mean().
scaleSố, không bắt buộcTỷ lệ sử dụng với bộ giảm tốc theo mét.
xPropertyChuỗi, không bắt buộcThuộc tính sẽ được dùng làm nhãn cho từng hình ảnh trên trục x. Giá trị mặc định là "system:time_start".

Ví dụ

Trình soạn thảo mã (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);