- X축: xProperty 값으로 라벨이 지정된 이미지
- Y축: 밴드 값
- 계열: 밴드 이름
차트를 반환합니다.
사용 | 반환 값 |
---|---|
ui.Chart.image.series(imageCollection, region, reducer, scale, xProperty) | ui.Chart |
인수 | 유형 | 세부정보 |
---|---|---|
imageCollection | ImageCollection | 차트에 포함할 데이터가 있는 ImageCollection입니다. |
region | Feature|FeatureCollection|Geometry | 축소할 영역입니다. |
reducer | 감소기(선택사항) | y축 값을 생성하는 리듀서입니다. 단일 값을 반환해야 합니다. 기본값은 ee.Reducer.mean()입니다. |
scale | 숫자, 선택사항 | 미터 단위로 리듀서와 함께 사용하도록 조정합니다. |
xProperty | 문자열, 선택사항 | x축의 각 이미지에 라벨로 사용할 속성입니다. 기본값은 'system:time_start'입니다. |
예
코드 편집기 (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);