ui.Chart.feature
मॉड्यूल में, Feature
और FeatureCollection
ऑब्जेक्ट से चार्ट रेंडर करने के लिए फ़ंक्शन का एक सेट होता है. फ़ंक्शन चुनने से, चार्ट में डेटा का क्रम तय होता है. इसका मतलब है कि x- और y-ऐक्सिस की वैल्यू और सीरीज़ को क्या तय करता है. अपने काम के लिए सबसे अच्छा फ़ंक्शन और चार्ट टाइप तय करने के लिए, यहां दिए गए फ़ंक्शन की जानकारी और उदाहरणों का इस्तेमाल करें.
चार्ट फ़ंक्शन
यहां दिए गए प्लॉट डायग्राम को विज़ुअल गाइड के तौर पर इस्तेमाल करें.इससे यह समझने में मदद मिलेगी कि हर फ़ंक्शन, चार्ट में सुविधाओं और उनकी प्रॉपर्टी को कैसे व्यवस्थित करता है. उदाहरण के लिए, कौनसे एलिमेंट x वैल्यू, y वैल्यू, और सीरीज़ तय करते हैं.
चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से, सुविधाओं को एक्स-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़ को प्रॉपर्टी के नामों की सूची से तय किया जाता है. इन प्रॉपर्टी की वैल्यू, y-ऐक्सिस के साथ प्लॉट की जाती हैं.
सुविधा की प्रॉपर्टी, नाम के हिसाब से x-ऐक्सिस पर प्लॉट की जाती हैं. दी गई प्रॉपर्टी की वैल्यू, y-ऐक्सिस पर प्लॉट की जाती हैं. सीरीज़, चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल की गई सुविधाएं होती हैं.
चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से, सुविधाओं को एक्स-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़, किसी प्रॉपर्टी की यूनीक वैल्यू से तय होती हैं. Y-ऐक्सिस की पोज़िशन, किसी प्रॉपर्टी की वैल्यू से तय होती है.
चुनी गई प्रॉपर्टी की वैल्यू के लिए फ़्रीक्वेंसी हिस्टोग्राम.
- X-ऐक्सिस: चुनी गई प्रॉपर्टी की वैल्यू के लिए हिस्टोग्राम बकेट
- Y-ऐक्सिस: हर हिस्टोग्राम बकेट के लिए ज़रूरी शर्तें पूरी करने वाली सुविधाओं की फ़्रीक्वेंसी
डेटा का उदाहरण
नीचे दिए गए उदाहरण, FeatureCollection
पर आधारित हैं. यह FeatureCollection
, तीन इको-रीजन फ़ीचर से बना है. इनमें ऐसी प्रॉपर्टी शामिल हैं जिनसे जलवायु के सामान्य हालात के बारे में पता चलता है.
देखें कि उदाहरण के तौर पर दिया गया डेटा कैसे बनाया गया
// Define three representative ecoregions in the USA. var desert = ee.Feature( ee.Geometry.Rectangle(-109.21, 31.42, -108.3, 32.03), {label: 'Desert', value: 0}); var forest = ee.Feature( ee.Geometry.Rectangle(-122.73, 43.45, -122.28, 43.91), {label: 'Forest', value: 1}); var grassland = ee.Feature( ee.Geometry.Rectangle(-101.81, 41.7, -100.53, 42.51), {label: 'Grassland', value: 2}); // Combine features into a feature collection. var ecoregions = ee.FeatureCollection([desert, forest, grassland]); // Load PRISM climate normals image collection; convert images to bands. var normClim = ee.ImageCollection('OREGONSTATE/PRISM/Norm81m').toBands(); // Summarize climate normals for each ecoregion feature as a set or properties. ecoregions = normClim.reduceRegions( {collection: ecoregions, reducer: ee.Reducer.mean(), scale: 5e4}); // Add a property for whether January temperature is warm or not. ecoregions = ecoregions.map(function(ecoregion) { return ecoregion.set('warm', ee.Number(ecoregion.get('01_tmean')).gt(0)); });
ui.Chart.feature.byFeature
कॉलम चार्ट
सुविधाओं को एक्स-ऐक्सिस के साथ प्लॉट किया जाता है और उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. सीरीज़ को आस-पास के कॉलम में दिखाया जाता है. ये कॉलम, प्रॉपर्टी के नामों की सूची के हिसाब से तय किए जाते हैं. इनकी वैल्यू, y-ऐक्सिस के साथ प्लॉट की जाती हैं.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .byFeature({ features: ecoregions.select('[0-9][0-9]_tmean|label'), xProperty: 'label', }) .setSeriesNames([ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]) .setChartType('ColumnChart') .setOptions({ title: 'Average Monthly Temperature by Ecoregion', hAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'Temperature (°C)', titleTextStyle: {italic: false, bold: true} }, colors: [ '604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07', 'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969' ] }); print(chart);
बार चार्ट
सुविधाओं को y-ऐक्सिस के साथ प्लॉट किया जाता है. साथ ही, उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. सीरीज़ को एक-दूसरे के बगल में मौजूद बार के तौर पर दिखाया जाता है. ये बार, प्रॉपर्टी के नामों की सूची के हिसाब से तय किए जाते हैं. इनकी वैल्यू, x-ऐक्सिस पर प्लॉट की जाती हैं.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .byFeature({ features: ecoregions.select('[0-9][0-9]_tmean|label'), xProperty: 'label', }) .setSeriesNames([ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]) .setChartType('BarChart') .setOptions({ title: 'Average Monthly Temperature by Ecoregion', hAxis: { title: 'Temperature (°C)', titleTextStyle: {italic: false, bold: true} }, vAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, colors: [ '604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07', 'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969' ] }); print(chart);
स्टैक किया गया कॉलम चार्ट
समुद्र तल के निरपेक्ष
सुविधाओं को एक्स-ऐक्सिस के साथ प्लॉट किया जाता है और उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. सीरीज़ को स्टैक किए गए कॉलम से दिखाया जाता है. ये कॉलम, प्रॉपर्टी के नामों की सूची के हिसाब से तय किए जाते हैं. इनकी वैल्यू को सीरीज़ के कुल योग के तौर पर, y-ऐक्सिस पर प्लॉट किया जाता है.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .byFeature({ features: ecoregions.select('[0-9][0-9]_ppt|label'), xProperty: 'label' }) .setSeriesNames([ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]) .setChartType('ColumnChart') .setOptions({ title: 'Average Monthly Precipitation by Ecoregion', hAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true} }, colors: [ '604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07', 'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969' ], isStacked: 'absolute' }); print(chart);
संबंधी
सुविधाओं को एक्स-ऐक्सिस के साथ प्लॉट किया जाता है और उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. सीरीज़ को स्टैक किए गए कॉलम के तौर पर दिखाया जाता है. ये कॉलम, प्रॉपर्टी के नामों की सूची के हिसाब से तय किए जाते हैं. इनकी वैल्यू को Y-ऐक्सिस पर, जोड़ी गई सीरीज़ के प्रतिशत के तौर पर प्लॉट किया जाता है.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .byFeature({ features: ecoregions.select('[0-9][0-9]_ppt|label'), xProperty: 'label' }) .setSeriesNames([ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]) .setChartType('ColumnChart') .setOptions({ title: 'Average Monthly Precipitation by Ecoregion', hAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true} }, colors: [ '604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07', 'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969' ], isStacked: 'percent' }); print(chart);
स्कैटर चार्ट
सुविधाओं को एक्स-ऐक्सिस के साथ प्लॉट किया जाता है और उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. सीरीज़ को पॉइंट के तौर पर दिखाया जाता है. ये पॉइंट, प्रॉपर्टी के नामों की सूची से तय किए जाते हैं. इनकी वैल्यू, y-ऐक्सिस के साथ प्लॉट की जाती हैं.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .byFeature({ features: ecoregions, xProperty: 'label', yProperties: ['01_tmean', '07_tmean'] }) .setSeriesNames(['Jan', 'Jul']) .setChartType('ScatterChart') .setOptions({ title: 'Average Monthly Temperature by Ecoregion', hAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'Temperature (°C)', titleTextStyle: {italic: false, bold: true} }, pointSize: 10, colors: ['1d6b99', 'cf513e'], }); print(chart);
कॉम्बो चार्ट
सुविधाओं को एक्स-ऐक्सिस के साथ प्लॉट किया जाता है और उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. सीरीज़ को पॉइंट और कॉलम के ज़रिए दिखाया जाता है. ये पॉइंट और कॉलम, प्रॉपर्टी के नामों की सूची से तय होते हैं. इनकी वैल्यू, y-ऐक्सिस के साथ प्लॉट की जाती हैं. यह चार्ट, दो ऐक्स और सीरीज़ के हिसाब से स्टाइल का इस्तेमाल करके बनाया गया है.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .byFeature({ features: ecoregions, xProperty: 'label', yProperties: ['06_ppt', '06_tmean'] }) .setSeriesNames(['Precipitation', 'Temperature']) .setChartType('ColumnChart') .setOptions({ title: 'Average June Temperature and Precipitation by Ecoregion', series: { 0: {targetAxisIndex: 1, type: 'bar', color: '1d6b99'}, 1: { targetAxisIndex: 0, type: 'line', lineWidth: 0, pointSize: 10, color: 'e37d05' } }, hAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, vAxes: { 0: { title: 'Temperature (°C)', baseline: 0, titleTextStyle: {italic: false, bold: true, color: 'e37d05'} }, 1: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true, color: '1d6b99'} }, }, bar: {groupWidth: '40%'}, }); print(chart);
ui.Chart.feature.byProperty
सेटअप का उदाहरण
ui.Chart.feature.byProperty
फ़ंक्शन, एक डिक्शनरी स्वीकार करता है. इसकी मदद से, x-ऐक्सिस पर प्रॉपर्टी के नामों के लेबल और क्रम को कंट्रोल किया जा सकता है. इसके लिए, प्रॉपर्टी के नामों को संख्या वाली वैल्यू असाइन करें. नीचे दिए गए कार्टिज़न ग्रिड चार्ट, महीने के लेबल सेट करने और महीने के नामों को समय के क्रम में क्रम से लगाने के लिए, इस विकल्प का इस्तेमाल करते हैं. ऐसा, महीने के औसत बारिश के डेटा के लिए किया जाता है.
कॉलम चार्ट
फ़ीचर प्रॉपर्टी को x-ऐक्सिस पर प्लॉट किया जाता है, लेबल किया जाता है, और डिक्शनरी इनपुट के हिसाब से क्रम में लगाया जाता है. दी गई प्रॉपर्टी की वैल्यू को y-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़, कॉलम के ज़रिए दिखाई जाने वाली सुविधाएं होती हैं. इन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है. बार चार्ट में बदलने के लिए, .setChartType('BarChart')
का इस्तेमाल करें.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define a dictionary that associates property names with values and labels. var precipInfo = { '01_ppt': {v: 1, f: 'Jan'}, '02_ppt': {v: 2, f: 'Feb'}, '03_ppt': {v: 3, f: 'Mar'}, '04_ppt': {v: 4, f: 'Apr'}, '05_ppt': {v: 5, f: 'May'}, '06_ppt': {v: 6, f: 'Jun'}, '07_ppt': {v: 7, f: 'Jul'}, '08_ppt': {v: 8, f: 'Aug'}, '09_ppt': {v: 9, f: 'Sep'}, '10_ppt': {v: 10, f: 'Oct'}, '11_ppt': {v: 11, f: 'Nov'}, '12_ppt': {v: 12, f: 'Dec'} }; // Organize property information into objects for defining x properties and // their tick labels. var xPropValDict = {}; // Dictionary to codify x-axis property names as values. var xPropLabels = []; // Holds dictionaries that label codified x-axis values. for (var key in precipInfo) { xPropValDict[key] = precipInfo[key].v; xPropLabels.push(precipInfo[key]); } // Define the chart and print it to the console. var chart = ui.Chart.feature .byProperty({ features: ecoregions, xProperties: xPropValDict, seriesProperty: 'label' }) .setChartType('ColumnChart') .setOptions({ title: 'Average Ecoregion Precipitation by Month', hAxis: { title: 'Month', titleTextStyle: {italic: false, bold: true}, ticks: xPropLabels }, vAxis: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true} }, colors: ['f0af07', '0f8755', '76b349'], }); print(chart);
लाइन चार्ट
फ़ीचर प्रॉपर्टी को x-ऐक्सिस पर प्लॉट किया जाता है, लेबल किया जाता है, और डिक्शनरी इनपुट के हिसाब से क्रम में लगाया जाता है. दी गई प्रॉपर्टी की वैल्यू को y-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़, ऐसी सुविधाएं होती हैं जिन्हें लाइनों से दिखाया जाता है. साथ ही, इन्हें चुनी गई प्रॉपर्टी की वैल्यू से लेबल किया जाता है.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define a dictionary that associates property names with values and labels. var precipInfo = { '01_ppt': {v: 1, f: 'Jan'}, '02_ppt': {v: 2, f: 'Feb'}, '03_ppt': {v: 3, f: 'Mar'}, '04_ppt': {v: 4, f: 'Apr'}, '05_ppt': {v: 5, f: 'May'}, '06_ppt': {v: 6, f: 'Jun'}, '07_ppt': {v: 7, f: 'Jul'}, '08_ppt': {v: 8, f: 'Aug'}, '09_ppt': {v: 9, f: 'Sep'}, '10_ppt': {v: 10, f: 'Oct'}, '11_ppt': {v: 11, f: 'Nov'}, '12_ppt': {v: 12, f: 'Dec'} }; // Organize property information into objects for defining x properties and // their tick labels. var xPropValDict = {}; // Dictionary to codify x-axis property names as values. var xPropLabels = []; // Holds dictionaries that label codified x-axis values. for (var key in precipInfo) { xPropValDict[key] = precipInfo[key].v; xPropLabels.push(precipInfo[key]); } // Define the chart and print it to the console. var chart = ui.Chart.feature .byProperty({ features: ecoregions, xProperties: xPropValDict, seriesProperty: 'label' }) .setChartType('ScatterChart') .setOptions({ title: 'Average Ecoregion Precipitation by Month', hAxis: { title: 'Month', titleTextStyle: {italic: false, bold: true}, ticks: xPropLabels }, vAxis: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true} }, colors: ['f0af07', '0f8755', '76b349'], lineSize: 5, pointSize: 0 }); print(chart);
क्षेत्र चार्ट
फ़ीचर प्रॉपर्टी को x-ऐक्सिस पर प्लॉट किया जाता है, लेबल किया जाता है, और डिक्शनरी इनपुट के हिसाब से क्रम में लगाया जाता है. दी गई प्रॉपर्टी की वैल्यू को y-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़, ऐसी सुविधाएं होती हैं जिन्हें रेखाओं और शेड किए गए इलाकों से दिखाया जाता है. साथ ही, इन्हें चुनी गई प्रॉपर्टी की वैल्यू से लेबल किया जाता है.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define a dictionary that associates property names with values and labels. var precipInfo = { '01_ppt': {v: 1, f: 'Jan'}, '02_ppt': {v: 2, f: 'Feb'}, '03_ppt': {v: 3, f: 'Mar'}, '04_ppt': {v: 4, f: 'Apr'}, '05_ppt': {v: 5, f: 'May'}, '06_ppt': {v: 6, f: 'Jun'}, '07_ppt': {v: 7, f: 'Jul'}, '08_ppt': {v: 8, f: 'Aug'}, '09_ppt': {v: 9, f: 'Sep'}, '10_ppt': {v: 10, f: 'Oct'}, '11_ppt': {v: 11, f: 'Nov'}, '12_ppt': {v: 12, f: 'Dec'} }; // Organize property information into objects for defining x properties and // their tick labels. var xPropValDict = {}; // Dictionary to codify x-axis property names as values. var xPropLabels = []; // Holds dictionaries that label codified x-axis values. for (var key in precipInfo) { xPropValDict[key] = precipInfo[key].v; xPropLabels.push(precipInfo[key]); } // Define the chart and print it to the console. var chart = ui.Chart.feature .byProperty({ features: ecoregions, xProperties: xPropValDict, seriesProperty: 'label' }) .setChartType('AreaChart') .setOptions({ title: 'Average Ecoregion Precipitation by Month', hAxis: { title: 'Month', titleTextStyle: {italic: false, bold: true}, ticks: xPropLabels }, vAxis: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true} }, colors: ['f0af07', '0f8755', '76b349'], lineSize: 5, pointSize: 0, curveType: 'function' }); print(chart);
पाई चार्ट
पाई एक सुविधा है. हर स्लाइस एक प्रॉपर्टी लेबल होता है. इसकी वैल्यू, पाई बनाने वाली प्रॉपर्टी की सभी वैल्यू के योग के प्रतिशत के तौर पर कैस्ट की जाती है.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Subset the forest ecoregion feature and select the monthly precipitation // properties, rename them as abbreviated months. var thisForest = ecoregions.filter(ee.Filter.eq('label', 'Forest')) .select(Object.keys(precipInfo), [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]); // Define the chart and print it to the console. var chart = ui.Chart.feature .byProperty({ features: thisForest, xProperties: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ] }) .setChartType('PieChart') .setOptions({ title: 'Average Monthly Precipitation for Forest Ecoregion', colors: [ '604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07', 'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969' ] }); print(chart);
डोनट चार्ट
pieHole
चार्ट विकल्प सेट करके, पाई चार्ट को डोनट चार्ट में बदलें. ज़्यादातर चार्ट में 0.4 से 0.6 के बीच की संख्याएं सबसे अच्छी दिखेंगी.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Subset the forest ecoregion feature and select the monthly precipitation // properties, rename them as abbreviated months. var thisForest = ecoregions.filter(ee.Filter.eq('label', 'Forest')) .select(Object.keys(precipInfo), [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]); // Define the chart and print it to the console. var chart = ui.Chart.feature .byProperty({ features: thisForest, xProperties: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ] }) .setChartType('PieChart') .setOptions({ title: 'Average Monthly Precipitation for Forest Ecoregion', colors: [ '604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07', 'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969' ], pieHole: 0.4, }); print(chart);
ui.Chart.feature.groups
कॉलम चार्ट
सुविधाओं को एक्स-ऐक्सिस के साथ प्लॉट किया जाता है और उन्हें चुनी गई प्रॉपर्टी की वैल्यू के हिसाब से लेबल किया जाता है.
सीरीज़ को कॉलम के ज़रिए दिखाया जाता है. ये कॉलम, किसी प्रॉपर्टी की यूनीक वैल्यू के सेट के हिसाब से तय किए जाते हैं. Y-ऐक्सिस की पोज़िशन, किसी प्रॉपर्टी की वैल्यू से तय होती है. चार्ट टाइप को 'ScatterChart'
(.setChartType('ScatterChart')
) पर सेट करके, इस प्लॉट को स्कैटर प्लॉट में बदला जा सकता है. इसके अलावा, अगर समय x-ऐक्सिस वैरिएबल है, तो लाइन चार्ट का इस्तेमाल किया जा सकता है:.setChartType('LineChart')
.
// Import the example feature collection. var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example'); // Define the chart and print it to the console. var chart = ui.Chart.feature .groups({ features: ecoregions, xProperty: 'label', yProperty: '01_tmean', seriesProperty: 'warm' }) .setSeriesNames(['Warm', 'Cold']) .setChartType('ColumnChart') .setOptions({ title: 'Average January Temperature by Ecoregion', hAxis: {title: 'Ecoregion', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'Jan temp (°C)', titleTextStyle: {italic: false, bold: true} }, bar: {groupWidth: '80%'}, colors: ['cf513e', '1d6b99'], isStacked: true }); print(chart);
ui.Chart.feature.histogram
x-ऐक्सिस को चुनी गई प्रॉपर्टी की वैल्यू की रेंज के लिए, वैल्यू के बिन से तय किया जाता है. y-ऐक्सिस, दिए गए बिन में एलिमेंट की संख्या होती है.
// Load PRISM climate normals image collection; convert images to bands. var normClim = ee.ImageCollection('OREGONSTATE/PRISM/Norm81m').toBands(); // Make a point sample of climate variables for a region in western USA. var region = ee.Geometry.Rectangle(-123.41, 40.43, -116.38, 45.14); var climSamp = normClim.sample(region, 5000); // Define the chart and print it to the console. var chart = ui.Chart.feature .histogram({features: climSamp, property: '07_ppt', maxBuckets: 30}) .setOptions({ title: 'July Precipitation Distribution for NW USA', hAxis: { title: 'Precipitation (mm)', titleTextStyle: {italic: false, bold: true} }, vAxis: { title: 'Pixel count', titleTextStyle: {italic: false, bold: true} }, colors: ['1d6b99'], legend: {position: 'none'} }); print(chart);