1

This example code below is generated using GEE Data Table Charts Section.

How can I print all table rows (they go to display in two pages) in one page and numbers in the second column with two decimal places?

// Define a DataTable using a JavaScript array with a column property header.
var dataTable = [
  [
    {label: 'State', role: 'domain', type: 'string'},
    {label: 'Population', role: 'data', type: 'number'},
  ],
  ['CA', 37253.956],
  ['NY', 19378.102],
  ['IL', 12830],
  ['MI', 9883],
  ['OR', 3831.234],
  ['CA', 37253.956],
  ['NY', 19378.102],
  ['IL', 12830],
  ['MI', 9883],
  ['OR', 3831.234],
  ['CA', 37253.956],
  ['NY', 19378.102],
  ['IL', 12830],
  ['MI', 9883],
  ['OR', 3831.234]
];

// Define the chart and print it to the console.
var chart = ui.Chart(dataTable).setChartType('Table').setOptions({
  format : '#.###',
  title: 'State Population (US census, 2010)',
  legend: {position: 'none'},
  colors: ['1d6b99'],
  page:'disable'
});
print(chart);

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.