From 6d27f164e774adaa05c26f67ebd154f5ba531990 Mon Sep 17 00:00:00 2001 From: daoudaDiallo Date: Wed, 3 May 2017 11:11:12 +0000 Subject: [PATCH] feat(tables): add hot-table component page (#1053) --- .angular-cli.json | 7 +- package.json | 4 +- src/app/pages/pages.menu.ts | 10 +- .../hotTables/handsontable-section.ts | 41 + .../hotTables/handsontable/advanced-demo.html | 2 + .../hotTables/handsontable/advanced-demo.ts | 42 + .../hotTables/handsontable/basic-demo.html | 3 + .../hotTables/handsontable/basic-demo.ts | 64 + .../components/hotTables/handsontable/data.ts | 483 +++++++ .../hotTables/handsontable/finance-demo.html | 2 + .../hotTables/handsontable/finance-demo.ts | 32 + .../hotTables/handsontable/science-demo.html | 2 + .../hotTables/handsontable/science-demo.ts | 73 + .../hotTables/handsontable/sheet-demo.html | 2 + .../hotTables/handsontable/sheet-demo.ts | 23 + .../hotTables/handsontable/sport-demo.html | 2 + .../hotTables/handsontable/sport-demo.ts | 41 + .../hotTables/hotTables.component.ts | 14 + .../components/hotTables/hotTables.scss | 5 + .../tables/components/hotTables/index.ts | 1 + src/app/pages/tables/tables.module.ts | 31 +- src/app/pages/tables/tables.routing.ts | 6 +- src/assets/css/handsontable.css | 1264 +++++++++++++++++ src/assets/images/76ers.gif | Bin 0 -> 4663 bytes src/assets/images/blazers.gif | Bin 0 -> 4928 bytes src/assets/images/bucks.gif | Bin 0 -> 5024 bytes src/assets/images/bulls.gif | Bin 0 -> 4670 bytes src/assets/images/cavaliers.gif | Bin 0 -> 6795 bytes src/assets/images/celtic.gif | Bin 0 -> 5847 bytes src/assets/images/clippers.gif | Bin 0 -> 5106 bytes src/assets/images/hawks.gif | Bin 0 -> 5852 bytes src/assets/images/heat.gif | Bin 0 -> 3944 bytes src/assets/images/hornets.gif | Bin 0 -> 4895 bytes src/assets/images/jazz.gif | Bin 0 -> 6418 bytes src/assets/images/kings.gif | Bin 0 -> 6205 bytes src/assets/images/knicks.gif | Bin 0 -> 5012 bytes src/assets/images/lakers.gif | Bin 0 -> 5555 bytes src/assets/images/magic.gif | Bin 0 -> 7334 bytes src/assets/images/mavericks.gif | Bin 0 -> 6951 bytes src/assets/images/memphis.gif | Bin 0 -> 4567 bytes src/assets/images/nets.gif | Bin 0 -> 4273 bytes src/assets/images/nuggets.gif | Bin 0 -> 7340 bytes src/assets/images/orleans.gif | Bin 0 -> 7182 bytes src/assets/images/pacers.gif | Bin 0 -> 4750 bytes src/assets/images/pistons.gif | Bin 0 -> 6046 bytes src/assets/images/raptors.gif | Bin 0 -> 6912 bytes src/assets/images/rockets.gif | Bin 0 -> 3462 bytes src/assets/images/spurs.gif | Bin 0 -> 5792 bytes src/assets/images/suns.gif | Bin 0 -> 4946 bytes src/assets/images/thunder.gif | Bin 0 -> 5450 bytes src/assets/images/timberwolves.gif | Bin 0 -> 7886 bytes src/assets/images/warriors.gif | Bin 0 -> 5678 bytes src/assets/images/wizards.gif | Bin 0 -> 3974 bytes src/typings.d.ts | 2 +- yarn.lock | 35 +- 55 files changed, 2177 insertions(+), 14 deletions(-) create mode 100644 src/app/pages/tables/components/hotTables/handsontable-section.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/advanced-demo.html create mode 100644 src/app/pages/tables/components/hotTables/handsontable/advanced-demo.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/basic-demo.html create mode 100644 src/app/pages/tables/components/hotTables/handsontable/basic-demo.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/data.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/finance-demo.html create mode 100644 src/app/pages/tables/components/hotTables/handsontable/finance-demo.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/science-demo.html create mode 100644 src/app/pages/tables/components/hotTables/handsontable/science-demo.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/sheet-demo.html create mode 100644 src/app/pages/tables/components/hotTables/handsontable/sheet-demo.ts create mode 100644 src/app/pages/tables/components/hotTables/handsontable/sport-demo.html create mode 100644 src/app/pages/tables/components/hotTables/handsontable/sport-demo.ts create mode 100644 src/app/pages/tables/components/hotTables/hotTables.component.ts create mode 100644 src/app/pages/tables/components/hotTables/hotTables.scss create mode 100644 src/app/pages/tables/components/hotTables/index.ts create mode 100644 src/assets/css/handsontable.css create mode 100644 src/assets/images/76ers.gif create mode 100644 src/assets/images/blazers.gif create mode 100644 src/assets/images/bucks.gif create mode 100644 src/assets/images/bulls.gif create mode 100644 src/assets/images/cavaliers.gif create mode 100644 src/assets/images/celtic.gif create mode 100644 src/assets/images/clippers.gif create mode 100644 src/assets/images/hawks.gif create mode 100644 src/assets/images/heat.gif create mode 100644 src/assets/images/hornets.gif create mode 100644 src/assets/images/jazz.gif create mode 100644 src/assets/images/kings.gif create mode 100644 src/assets/images/knicks.gif create mode 100644 src/assets/images/lakers.gif create mode 100644 src/assets/images/magic.gif create mode 100644 src/assets/images/mavericks.gif create mode 100644 src/assets/images/memphis.gif create mode 100644 src/assets/images/nets.gif create mode 100644 src/assets/images/nuggets.gif create mode 100644 src/assets/images/orleans.gif create mode 100644 src/assets/images/pacers.gif create mode 100644 src/assets/images/pistons.gif create mode 100644 src/assets/images/raptors.gif create mode 100644 src/assets/images/rockets.gif create mode 100644 src/assets/images/spurs.gif create mode 100644 src/assets/images/suns.gif create mode 100644 src/assets/images/thunder.gif create mode 100644 src/assets/images/timberwolves.gif create mode 100644 src/assets/images/warriors.gif create mode 100644 src/assets/images/wizards.gif diff --git a/.angular-cli.json b/.angular-cli.json index aca32db7..b63893f9 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -27,6 +27,7 @@ "../node_modules/leaflet/dist/leaflet.css", "../node_modules/chartist/dist/chartist.css", "../node_modules/fullcalendar/dist/fullcalendar.css", + "../node_modules/handsontable/dist/handsontable.full.css", "app/theme/theme.scss", "styles.scss" ], @@ -35,7 +36,9 @@ "../node_modules/easy-pie-chart/dist/jquery.easypiechart.js", "../node_modules/jquery-slimscroll/jquery.slimscroll.js", "../node_modules/tether/dist/js/tether.js", - "../node_modules/bootstrap/dist/js/bootstrap.js" + "../node_modules/bootstrap/dist/js/bootstrap.js", + "../node_modules/handsontable/dist/handsontable.full.js", + "../node_modules/chroma-js/chroma.js" ], "environmentSource": "environments/environment.ts", "environments": { @@ -70,4 +73,4 @@ "component": { } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 47445ae3..21aa8517 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "bootstrap": "4.0.0-alpha.6", "chart.js": "1.1.1", "chartist": "0.10.1", + "chroma-js": "1.3.3", "ckeditor": "4.6.2", "core-js": "2.4.1", "easy-pie-chart": "2.1.7", @@ -74,6 +75,7 @@ "lodash": "4.17.4", "ng2-ckeditor": "1.1.6", "ng2-completer": "1.3.1", + "ng2-handsontable": "0.48.0", "ng2-smart-table": "1.0.3", "ng2-tree": "2.0.0-alpha.5", "ngx-uploader": "2.2.5", @@ -116,4 +118,4 @@ "wintersmith": "2.2.5", "wintersmith-sassy": "1.1.0" } -} +} \ No newline at end of file diff --git a/src/app/pages/pages.menu.ts b/src/app/pages/pages.menu.ts index a2ae2e71..921fe1ff 100644 --- a/src/app/pages/pages.menu.ts +++ b/src/app/pages/pages.menu.ts @@ -199,7 +199,15 @@ export const PAGES_MENU = [ title: 'Data Tables', } } - } + }, + { + path: 'hottables', + data: { + menu: { + title: 'Hot Tables', + } + } + } ] }, { diff --git a/src/app/pages/tables/components/hotTables/handsontable-section.ts b/src/app/pages/tables/components/hotTables/handsontable-section.ts new file mode 100644 index 00000000..04dd1335 --- /dev/null +++ b/src/app/pages/tables/components/hotTables/handsontable-section.ts @@ -0,0 +1,41 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'handsontable-section', + template: ` +
+
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+
+ ` +}) +export class HandsontableSectionComponent { + currentHeading:string = 'Basic'; + +select(e) { + if (e.heading) { + this.currentHeading = e.heading; + } + } +} + +function escape(text: string): string { + return text.replace(/{/g, '{').replace(/}/g, '}'); +} diff --git a/src/app/pages/tables/components/hotTables/handsontable/advanced-demo.html b/src/app/pages/tables/components/hotTables/handsontable/advanced-demo.html new file mode 100644 index 00000000..9b3acce0 --- /dev/null +++ b/src/app/pages/tables/components/hotTables/handsontable/advanced-demo.html @@ -0,0 +1,2 @@ +

Advanced demo

+ \ No newline at end of file diff --git a/src/app/pages/tables/components/hotTables/handsontable/advanced-demo.ts b/src/app/pages/tables/components/hotTables/handsontable/advanced-demo.ts new file mode 100644 index 00000000..8ba2845b --- /dev/null +++ b/src/app/pages/tables/components/hotTables/handsontable/advanced-demo.ts @@ -0,0 +1,42 @@ +import { Component } from '@angular/core'; +import * as Handsontable from 'handsontable/dist/handsontable.full.js'; +import { getAdvancedData } from './data'; + + +@Component({ + selector: 'advanced-demo', + templateUrl: './advanced-demo.html' +}) +export class AdvancedDemoComponent { + data:Array; + colHeaders:Array; + columns:Array; + options:any; + + constructor() { + this.data = getAdvancedData(); + this.colHeaders = ['Country', 'Level', 'Units', 'As Of', '1Y Chg', '5Y Ago', '10Y Ago', '25Y Ago']; + this.columns = [ + {data: 0, type: 'text'}, + {data: 1, type: 'numeric', format: '0,0.00[0000]'}, + {data: 2, type: 'text'}, + {data: 3, type: 'numeric', format: '0'}, + {data: 4, type: 'numeric', format: '0.00%', + renderer: function percentRenderer(instance, td, row, col, prop, value, cellProperties) { + Handsontable.renderers.NumericRenderer.apply(this, arguments); + td.style.color = (value < 0) ? 'red' : 'green'; + }}, + {data: 5, type: 'numeric', format: '0,0.00[0000]'}, + {data: 6, type: 'numeric', format: '0,0.00[0000]'} + ]; + this.options = { + height: 396, + rowHeaders: true, + stretchH: 'all', + columnSorting: true, + contextMenu: true, + className: 'htCenter htMiddle', + readOnly: true + }; + } +} diff --git a/src/app/pages/tables/components/hotTables/handsontable/basic-demo.html b/src/app/pages/tables/components/hotTables/handsontable/basic-demo.html new file mode 100644 index 00000000..2229fd80 --- /dev/null +++ b/src/app/pages/tables/components/hotTables/handsontable/basic-demo.html @@ -0,0 +1,3 @@ +

Basic demo

+ + diff --git a/src/app/pages/tables/components/hotTables/handsontable/basic-demo.ts b/src/app/pages/tables/components/hotTables/handsontable/basic-demo.ts new file mode 100644 index 00000000..018e4009 --- /dev/null +++ b/src/app/pages/tables/components/hotTables/handsontable/basic-demo.ts @@ -0,0 +1,64 @@ +import { Component } from '@angular/core'; +import { genData } from './data'; + +@Component({ + selector: 'basic-demo', + templateUrl: './basic-demo.html' +}) +export class BasicDemoComponent { + data: Array = genData(10); + colHeaders: Array = ['ID', 'First Name', 'Last Name', 'Address', + 'Favorite food', 'Price', 'Is active']; + columns: Array = [ + { + data: 'id' + }, + { + data: 'name.first', + renderer: 'text', + readOnly: true + }, + { + data: 'name.last', + readOnly: true + }, + { + data: 'address' + }, + { + data: 'product.description', + source: 'product.options', + optionField: 'description', + type: 'autocomplete', + strict: false, + visibleRows: 4 + }, + { + data: 'price', + type: 'numeric', + format: '$ 0,0.00' + }, + { + data: 'isActive', + type: 'checkbox', + checkedTemplate: 'Yes', + uncheckedTemplate: 'No' + } + ]; + colWidths: Array = [null, null, null, null, null, null, 30]; + options: any = { + stretchH: 'all', + columnSorting: true, + contextMenu: [ + 'row_above', 'row_below', 'remove_row' + ] + }; + + afterChange(e: any) { + console.log(e); + } + + afterOnCellMouseDown(e: any) { + console.log(e); + } +} diff --git a/src/app/pages/tables/components/hotTables/handsontable/data.ts b/src/app/pages/tables/components/hotTables/handsontable/data.ts new file mode 100644 index 00000000..68205e78 --- /dev/null +++ b/src/app/pages/tables/components/hotTables/handsontable/data.ts @@ -0,0 +1,483 @@ +export function genData(rows:number = 10):Array { + let products:Array = [ + { + description: 'Big Mac', + options: [ + {description: 'Big Mac'}, + {description: 'Big Mac & Co'}, + {description: 'McRoyal'}, + {description: 'Hamburger'}, + {description: 'Cheeseburger'}, + {description: 'Double Cheeseburger'} + ] + }, + { + description: 'Fried Potatoes', + options: [ + {description: 'Fried Potatoes'}, + {description: 'Fried Onions'} + ] + } + ], + firstNames = ['Ted', 'John', 'Macy', 'Rob', 'Gwen', 'Fiona', 'Mario', + 'Ben', 'Kate', 'Kevin', 'Thomas', 'Frank'], + lastNames = ['Tired', 'Johnson', 'Moore', 'Rocket', 'Goodman', 'Farewell', + 'Manson', 'Bentley', 'Kowalski', 'Schmidt', 'Tucker', 'Fancy'], + address = ['Turkey', 'Japan', 'Michigan', 'Russia', 'Greece', 'France', 'USA', + 'Germany', 'Sweden', 'Denmark', 'Poland', 'Belgium']; + + let items:Array = []; + let product:any; + let newProduct; + + for (let i = 0; i < rows; i++) { + // clone expected product + product = products[Math.floor(Math.random() * products.length)]; + newProduct = { + description: product.description, + options: [] + }; + product.options.forEach(function (p) { + newProduct.options.push({description: p.description}); + }); + /// clone expected product + + items.push({ + id: i + 1, + name: { + first: firstNames[Math.floor(Math.random() * firstNames.length)], + last: lastNames[Math.floor(Math.random() * lastNames.length)] + }, + date: `${Math.max(Math.round(Math.random() * 12), 1)} / ${Math.max(Math.round(Math.random() * 28), 1)} / + ${(Math.round(Math.random() * 80) + 1940)}`, + address: `${Math.floor(Math.random() * 100000)} ${address[Math.floor(Math.random() * address.length)]}`, + price: Math.floor(Math.random() * 100000) / 100, + isActive: Math.floor(Math.random() * products.length) / 2 === 0 ? 'Yes' : 'No', + product: newProduct + }); + } + + return items; +}; + +export function getAdvancedData():Array { + return [ + ['Afghanistan', '30.552', '1000s', '2013', '0.0244', '27.708', '24.019', '11.215'], + ['Albania', '2.774', '1000s', '2013', '-0.0100', '2.884', '3.015', '3.228'], + ['Algeria', '39.208', '1000s', '2013', '0.0189', '36.383', '33.461', '25.577'], + ['Angola', '21.472', '1000s', '2013', '0.0313', '18.927', '15.977', '10.051'], + ['Antigua and Barbuda', '90', '1000s', '2013', '0.0103', '86', '82', '62'], + ['Argentina', '41.446', '1000s', '2013', '0.0087', '40.024', '38.309', '32.17'], + ['Armenia', '2.977', '1000s', '2013', '0.025', '2.968', '3.026', '3.543'], + ['Australia', '23.131', '1000s', '2013', '0.0179', '21.692', '20.127', '16.814'], + ['Austria', '8.474', '1000s', '2013', '0.0052', '8.365', '8.172', '7.62'], + ['Azerbaijan', '9.296', '1000s', '2012', '0.0134', '8.763', '8.234', '6.994'], + ['Bahrain', '1.332', '1000s', '2013', '0.0109', '1.192', '821', '481'], + ['Bangladesh', '156.595', '1000s', '2013', '0.0123', '149.503', '141.235', '104.779'], + ['Barbados', '285', '1000s', '2013', '0.0050', '279', '272', '258'], + ['Belarus', '9.464', '1000s', '2012', '-0.0010', '9.528', '9.797', '10.14'], + ['Belgium', '11.195', '1000s', '2013', '0.0060', '10.796', '10.421', '9.938'], + ['Belize', '324', '1000s', '2012', '0.0246', '294', '258', '179'], + ['Benin', '10.323', '1000s', '2013', '0.0271', '9.241', '7.923', '4.836'], + ['Bhutan', '754', '1000s', '2013', '0.0163', '705', '634', '530'], + ['Bolivia', '10.671', '1000s', '2013', '0.0167', '9.993', '9.188', '6.636'], + ['Bosnia and Herzegovina', '3.829', '1000s', '2013', '-0.0012', '3.853', '3.887', '4.585'], + ['Botswana', '2.021', '1000s', '2013', '0.0086', '1.952', '1.855', '1.343'], + ['Brazil', '200.362', '1000s', '2013', '0.0086', '193.491', '184.01', '147.079'], + ['Brunei', '418', '1000s', '2013', '0.0135', '394', '361', '250'], + ['Bulgaria', '7.265', '1000s', '2013', '-0.0056', '7.444', '7.781', '8.877'], + ['Burkina Faso', '16.935', '1000s', '2013', '0.0288', '15.095', '13.034', '8.58'], + ['Burundi', '10.163', '1000s', '2013', '0.0318', '8.927', '7.511', '5.449'], + ['Cambodia', '15.135', '1000s', '2013', '0.0182', '14.144', '13.149', '8.769'], + ['Cameroon', '22.254', '1000s', '2013', '0.0255', '20.104', '17.675', '11.717'], + ['Canada', '35.158', '1000s', '2013', '0.0116', '33.629', '31.995', '27.379'], + ['Cape Verde', '499', '1000s', '2013', '0.0091', '486', '474', '346'], + ['Central African Republic', '4.616', '1000s', '2013', '0.0202', '4.266', '3.894', '2.852'], + ['Chad', '12.825', '1000s', '2013', '0.0303', '11.371', '9.665', '5.765'], + ['Chile', '17.62', '1000s', '2013', '0.0089', '16.992', '16.168', '12.981'], + ['China', '1.357.380', '1000s', '2013', '0.0049', '1.331.260', '1.296.075', '1.118.650'], + ['Colombia', '48.321', '1000s', '2013', '0.0129', '45.803', '42.528', '32.657'], + ['Comoros', '718', '1000s', '2012', '0.0247', '649', '570', '393'], + ['Congo', '67.514', '1000s', '2013', '0.0275', '60.486', '52.487', '33.728'], + ['Congo-Brazzaville', '4.448', '1000s', '2013', '0.0255', '3.995', '3.449', '2.32'], + ['Costa Rica', '4.872', '1000s', '2013', '0.0139', '4.601', '4.246', '3.001'], + ['Croatia', '4.253', '1000s', '2013', '-0.0035', '4.429', '4.439', '4.767'], + ['Cuba', '11.266', '1000s', '2013', '-0.0005', '11.289', '11.273', '10.504'], + ['Cyprus', '1.141', '1000s', '2013', '0.0108', '1.091', '1.016', '751'], + ['Czech Republic', '10.521', '1000s', '2013', '0.0010', '10.444', '10.197', '10.361'], + ['Denmark', '5.614', '1000s', '2013', '0.0040', '5.523', '5.405', '5.133'], + ['Djibouti', '873', '1000s', '2013', '0.0154', '822', '766', '560'], + ['Dominica', '72', '1000s', '2013', '0.0045', '71', '70', '71'], + ['Dominican Republic', '10.404', '1000s', '2013', '0.0124', '9.884', '9.207', '7.099'], + ['Ecuador', '15.492', '1000s', '2012', '0.0161', '14.512', '13.28', '9.651'], + ['Egypt', '82.056', '1000s', '2013', '0.0165', '76.775', '70.591', '55.207'], + ['El Salvador', '6.34', '1000s', '2013', '0.0068', '6.183', '6.05', '5.269'], + ['Equatorial Guinea', '757', '1000s', '2013', '0.0281', '677', '586', '362'], + ['Eritrea', '6.333', '1000s', '2013', '0.0330', '5.558', '4.666', '3.21'], + ['Estonia', '1.325', '1000s', '2013', '-0.0003', '1.335', '1.363', '1.568'], + ['Ethiopia', '94.101', '1000s', '2013', '0.0259', '84.838', '74.066', '46.435'], + ['Fiji', '881', '1000s', '2013', '0.0072', '852', '819', '724'], + ['Finland', '5.439', '1000s', '2013', '0.0047', '5.339', '5.228', '4.964'], + ['France', '66.028', '1000s', '2013', '0.0054', '64.703', '62.702', '58.114'], + ['Gabon', '1.672', '1000s', '2013', '0.0240', '1.519', '1.347', '921'], + ['Gambia', '1.849', '1000s', '2013', '0.0324', '1.628', '1.392', '881'], + ['Georgia', '4.477', '1000s', '2013', '-0.0031', '4.411', '4.318', '4.803'], + ['Germany', '80.622', '1000s', '2013', '0.0024', '81.902', '82.516', '78.751'], + ['Ghana', '25.905', '1000s', '2013', '0.0212', '23.692', '20.836', '14.233'], + ['Greece', '11.032', '1000s', '2013', '-0.0054', '11.187', '11.056', '10.089'], + ['Grenada', '106', '1000s', '2013', '0.0039', '104', '103', '97'], + ['Guatemala', '15.468', '1000s', '2013', '0.0256', '13.989', '12.368', '8.688'], + ['Guinea', '11.745', '1000s', '2013', '2.57', '10.593', '9.38', '5.751'], + ['Guinea-Bissau', '1.704', '1000s', '2013', '0.0245', '1.551', '1.391', '995'], + ['Guyana', '800', '1000s', '2013', '0.0053', '781', '757', '728'], + ['Haiti', '10.317', '1000s', '2013', '0.0141', '9.765', '9.13', '6.965'], + ['Honduras', '8.098', '1000s', '2013', '0.0204', '7.47', '6.762', '4.767'], + ['Hong Kong', '7.188', '1000s', '2013', '0.0046', '6.973', '6.784', '5.686'], + ['Hungary', '9.897', '1000s', '2013', '-0.0023', '10.023', '10.107', '10.482'], + ['Iceland', '323', '1000s', '2013', '0.0071', '318', '292', '253'], + ['India', '1.252.140', '1000s', '2013', '0.0125', '1.190.138', '1.110.626', '851.375'], + ['Indonesia', '249.866', '1000s', '2013', '0.0122', '237.487', '221.294', '175.461'], + ['Iran', '77.447', '1000s', '2013', '0.0134', '73.543', '69.342', '54.938'], + ['Iraq', '33.417', '1000s', '2013', '0.0258', '30.163', '26.674', '17.074'], + ['Ireland', '4.595', '1000s', '2013', '0.0018', '4.535', '4.07', '3.511'], + ['Israel', '8.059', '1000s', '2013', '0.0188', '7.486', '6.809', '4.518'], + ['Italy', '59.831', '1000s', '2013', '0.0049', '59.095', '57.685', '56.672'], + ['Ivory Coast', '20.316', '1000s', '2013', '0.0240', '18.601', '17.144', '11.711'], + ['Jamaica', '2.715', '1000s', '2013', '0.0027', '2.681', '2.634', '2.375'], + ['Japan', '127.339', '1000s', '2013', '-0.0017', '127.558', '127.761', '123.116'], + ['Jordan', '6.459', '1000s', '2013', '0.0223', '5.915', '5.29', '3.056'], + ['Kazakhstan', '17.038', '1000s', '2013', '0.0147', '16.093', '15.013', '16.25'], + ['Kenya', '44.354', '1000s', '2013', '0.0272', '39.825', '34.835', '22.667'], + ['Kiribati', '102', '1000s', '2013', '0.0155', '96', '89', '69'], + ['Kosovo', '1.824', '1000s', '2013', '0.0093', '1.761', '1.705', '1.827'], + ['Kuwait', '3.369', '1000s', '2013', '0.0363', '2.85', '2.196', '2.059'], + ['Kyrgyzstan', '5.72', '1000s', '2013', '0.0200', '5.383', '5.105', '4.308'], + ['Laos', '6.77', '1000s', '2013', '0.0186', '6.268', '5.699', '4.123'], + ['Latvia', '2.013', '1000s', '2013', '-0.0103', '2.142', '2.263', '2.667'], + ['Lebanon', '4.467', '1000s', '2013', '0.0096', '4.247', '3.854', '2.677'], + ['Lesotho', '2.074', '1000s', '2013', '0.0112', '1.99', '1.912', '1.57'], + ['Liberia', '4.294', '1000s', '2013', '0.0247', '3.821', '3.185', '2.137'], + ['Libya', '6.202', '1000s', '2013', '0.0076', '5.964', '5.507', '4.161'], + ['Lithuania', '2.956', '1000s', '2013', '-0.0106', '3.163', '3.377', '3.684'], + ['Luxembourg', '543', '1000s', '2013', '0.0231', '498', '458', '377'], + ['Macedonia', '2.107', '1000s', '2013', '0.0008', '2.101', '2.086', '2.006'], + ['Madagascar', '22.925', '1000s', '2013', '0.0283', '20.496', '17.763', '11.206'], + ['Malawi', '16.363', '1000s', '2013', '0.0287', '14.573', '12.569', '9.105'], + ['Malaysia', '29.717', '1000s', '2013', '0.0163', '27.79', '25.365', '17.707'], + ['Maldives', '345', '1000s', '2013', '0.0194', '320', '293', '210'], + ['Mali', '15.302', '1000s', '2013', '0.0302', '13.559', '11.573', '7.826'], + ['Malta', '423', '1000s', '2013', '0.0091', '412', '401', '351'], + ['Mauritania', '3.89', '1000s', '2013', '0.0247', '3.516', '3.055', '1.969'], + ['Mauritius', '1.296', '1000s', '2013', '0.0040', '1.275', '1.233', '1.049'], + ['Mexico', '122.332', '1000s', '2013', '0.0123', '116.423', '109.382', '84.327'], + ['Moldova', '3.559', '1000s', '2013', '-0.0001', '3.566', '3.604', '3.681'], + ['Mongolia', '2.839', '1000s', '2013', '0.0152', '2.672', '2.496', '2.141'], + ['Montenegro', '621', '1000s', '2013', '0.0005', '619', '615', '612'], + ['Morocco', '33.008', '1000s', '2013', '0.0150', '31.277', '29.856', '24.212'], + ['Mozambique', '25.834', '1000s', '2013', '0.0250', '23.361', '20.439', '13.395'], + ['Myanmar', '53.259', '1000s', '2013', '0.0087', '51.54', '49.875', '41.445'], + ['Namibia', '2.303', '1000s', '2013', '0.0194', '2.143', '2.003', '1.361'], + ['Nepal', '27.797', '1000s', '2013', '0.0118', '26.545', '24.922', '17.68'], + ['Netherlands', '16.804', '1000s', '2013', '0.0029', '16.53', '16.282', '14.849'], + ['New Zealand', '4.471', '1000s', '2013', '0.0085', '4.316', '4.088', '3.299'], + ['Nicaragua', '6.08', '1000s', '2013', '0.0148', '5.743', '5.386', '4.046'], + ['Niger', '17.831', '1000s', '2013', '0.0393', '15.303', '12.709', '7.52'], + ['Nigeria', '173.615', '1000s', '2013', '0.0283', '155.381', '135.999', '93.18'], + ['North Korea', '24.895', '1000s', '2013', '0.0053', '24.372', '23.639', '19.895'], + ['Norway', '5.084', '1000s', '2013', '0.0131', '4.829', '4.592', '4.227'], + ['Oman', '3.632', '1000s', '2013', '0.0961', '2.663', '2.464', '1.743'], + ['Pakistan', '182.143', '1000s', '2013', '0.0166', '170.094', '155.151', '107.865'], + ['Panama', '3.864', '1000s', '2013', '0.0163', '3.616', '3.303', '2.435'], + ['Papua New Guinea', '7.321', '1000s', '2013', '0.0215', '6.705', '5.948', '4.057'], + ['Paraguay', '6.802', '1000s', '2013', '0.0172', '6.347', '5.793', '4.139'], + ['Peru', '30.376', '1000s', '2013', '0.0129', '28.934', '27.404', '21.326'], + ['Philippines', '98.394', '1000s', '2013', '0.0174', '91.886', '84.231', '60.41'], + ['Poland', '38.531', '1000s', '2013', '-0.0001', '38.152', '38.182', '37.962'], + ['Portugal', '10.46', '1000s', '2013', '-0.0052', '10.568', '10.484', '10.005'], + ['Qatar', '2.169', '1000s', '2013', '0.0576', '1.564', '720', '463'], + ['Romania', '19.964', '1000s', '2013', '-0.0056', '20.367', '21.452', '23.161'], + ['Russia', '143.5', '1000s', '2013', '0.0022', '141.909', '143.821', '147.721'], + ['Rwanda', '11.777', '1000s', '2013', '0.0278', '10.53', '9.254', '7.224'], + ['Saint Kitts and Nevis', '54', '1000s', '2013', '0.0113', '52', '48', '41'], + ['Saint Lucia', '182', '1000s', '2013', '0.0078', '175', '163', '136'], + ['Saint Vincent and the Grenadines', '109', '1000s', '2013', '0.0000', '109', '109', '107'], + ['Samoa', '190', '1000s', '2013', '0.0079', '185', '179', '162'], + ['San Marino', '31', '1000s', '2013', '0.0064', '31', '29', '24'], + ['Sao Tome and Principe', '193', '1000s', '2013', '0.0260', '173', '151', '115'], + ['Saudi Arabia', '28.829', '1000s', '2013', '0.0191', '26.796', '23.839', '15.665'], + ['Senegal', '14.133', '1000s', '2013', '0.0297', '12.587', '10.968', '7.285'], + ['Serbia', '7.164', '1000s', '2013', '-0.0049', '7.321', '7.463', 'n.a.'], + ['Seychelles', '89', '1000s', '2013', '0.0099', '87', '82', '69'], + ['Sierra Leone', '6.092', '1000s', '2013', '0.0190', '5.641', '4.928', '3.993'], + ['Singapore', '5.399', '1000s', '2013', '0.0163', '4.988', '4.167', '2.931'], + ['Slovak Republic', '5.414', '1000s', '2013', '0.0012', '5.386', '5.372', '5.276'], + ['Slovenia', '2.06', '1000s', '2013', '0.0016', '2.04', '1.997', '1.996'], + ['Solomon Islands', '561', '1000s', '2013', '0.0212', '515', '458', '303'], + ['Somalia', '10.496', '1000s', '2013', '0.0295', '9.381', '8.25', '6.285'], + ['South Africa', '52.982', '1000s', '2013', '0.0135', '50.223', '47.019', '34.491'], + ['South Korea', '50.22', '1000s', '2013', '0.0043', '49.182', '48.039', '42.449'], + ['South Sudan', '11.296', '1000s', '2013', '0.0423', '9.521', '7.73', '5.775'], + ['Spain', '46.647', '1000s', '2013', '-0.0024', '46.363', '42.922', '38.791'], + ['Sri Lanka', '20.483', '1000s', '2013', '0.0076', '20.45', '19.435', '16.825'], + ['Sudan', '37.964', '1000s', '2013', '0.0207', '34.853', '30.779', '19.295'], + ['Suriname', '539', '1000s', '2013', '0.0089', '520', '493', '400'], + ['Swaziland', '1.25', '1000s', '2013', '0.0151', '1.174', '1.095', '834'], + ['Sweden', '9.593', '1000s', '2013', '0.0077', '9.299', '8.994', '8.493'], + ['Switzerland', '8.081', '1000s', '2013', '0.0106', '7.744', '7.39', '6.647'], + ['Syria', '22.846', '1000s', '2013', '0.0199', '21.032', '17.676', '12.088'], + ['Tajikistan', '8.208', '1000s', '2013', '0.0248', '7.447', '6.664', '5.16'], + ['Tanzania', '49.253', '1000s', '2013', '0.0308', '43.64', '37.765', '24.686'], + ['Thailand', '67.011', '1000s', '2013', '0.0034', '66.277', '65.087', '55.833'], + ['The Bahamas', '377', '1000s', '2013', '0.0146', '354', '322', '252'], + ['Timor-Leste', '1.178', '1000s', '2013', '0.0255', '1.049', '967', '730'], + ['Togo', '6.817', '1000s', '2013', '0.0262', '6.144', '5.398', '3.685'], + ['Tonga', '105', '1000s', '2013', '0.0036', '104', '100', '95'], + ['Trinidad and Tobago', '1.341', '1000s', '2013', '0.0028', '1.323', '1.29', '1.214'], + ['Tunisia', '10.886', '1000s', '2013', '0.0101', '10.44', '9.932', '7.959'], + ['Turkey', '74.933', '1000s', '2013', '0.0126', '71.241', '66.846', '53.066'], + ['Turkmenistan', '5.24', '1000s', '2013', '0.0130', '4.979', '4.697', '3.571'], + ['Tuvalu', '10', '1000s', '2013', '0.0016', '10', '10', '9'], + ['UAE', '9.346', '1000s', '2013', '0.0153', '7.718', '3.659', '1.707'], + ['Uganda', '37.579', '1000s', '2013', '0.0339', '32.864', '27.767', '16.923'], + ['UK', '64.097', '1000s', '2013', '0.0063', '62.276', '59.988', '57.077'], + ['Ukraine', '45.49', '1000s', '2013', '-0.0023', '46.053', '47.452', '51.773'], + ['Uruguay', '3.407', '1000s', '2013', '0.0035', '3.36', '3.324', '3.089'], + ['USA', '316.129', '1000s', '2013', '0.0072', '306.772', '292.805', '246.819'], + ['Uzbekistan', '30.241', '1000s', '2013', '0.0157', '27.767', '25.864', '20.077'], + ['Vanuatu', '253', '1000s', '2013', '0.0222', '231', '204', '143'], + ['Venezuela', '30.405', '1000s', '2013', '0.0150', '28.583', '26.261', '19.256'], + ['Vietnam', '89.709', '1000s', '2013', '0.0105', '86.025', '81.438', '64.774'], + ['Yemen', '24.407', '1000s', '2013', '0.0233', '22.23', '19.613', '11.27'], + ['Zambia', '14.539', '1000s', '2013', '0.0329', '12.825', '11.175', '7.647'], + ['Zimbabwe', '14.15', '1000s', '2013', '0.0310', '12.889', '12.693', '10.167'], + ['Zimbabwe', '14.15', '1000s', '2013', '0.0310', '12.889', '12.693', '10.167'] + ]; +}; + +export function getPersonalData() { + return [ + ['', 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC', 'Total'], + ['Total Incomes', '=SUM(B7:B12)', '=SUM(C7:C12)', '=SUM(D7:D12)', '=SUM(E7:E12)', + '=SUM(F7:F12)', '=SUM(G7:G12)', '=SUM(H7:H12)', '=SUM(I7:I12)', '=SUM(J7:J12)', '=SUM(K7:K12)', + '=SUM(L7:L12)', '=SUM(M7:M12)', '=SUM(B2:M2)'], + ['Total Expenses', '=SUM(B17:B43)', '=SUM(C17:C43)', '=SUM(D17:D43)', '=SUM(E17:E43)', + '=SUM(F17:F43)', '=SUM(G17:G43)', '=SUM(H17:H43)', '=SUM(I17:I43)', '=SUM(J17:J43)', + '=SUM(K17:K43)', '=SUM(L17:L43)', '=SUM(M17:M43)', '=SUM(B3:M3)'], + ['NET (Income - Expenses)', '=B2-B3', '=C2-C3', '=D2-D3', '=E2-E3', '=F2-F3', '=G2-G3', + '=H2-H3', '=I2-I3', '=J2-J3', '=K2-K3', '=L2-L3', '=M2-M3', '=N2-N3', ''], + ['', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Income', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Salary', 11370, 11370, 11370, 11370, 11370, 11370, 11370, 11370, 11370, 11370, 11370, 11370, ''], + ['Interest income', 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, ''], + ['Public assistance', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', ''], + ['Dividends', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', '- ', ''], + ['Gifts', 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, ''], + ['Other', 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, ''], + ['', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Expenses', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Living', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Rent/Mortgage', 3200, 3200, 3200, 3200, 3200, 3200, 3200, 3200, 3200, 3200, 3200, 3200, ''], + ['Electricity', 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, ''], + ['Water/Gas/Sewer', 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, ''], + ['TV/Internet/Phone', 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, ''], + ['Maintenance', 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, ''], + ['Obligations', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Loans', 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, ''], + ['Credit cards', 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, ''], + ['Taxes', '450', '450', '450', '450', '450', '450', '450', '450', '450', '450', '450', '450', ''], + ['Insurance', '140', '140', '140', '140', '140', '140', '140', '140', '140', '140', '140', '140', ''], + ['Daily expenses', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Food', 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, ''], + ['Clothing', 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, ''], + ['Personal supplies', 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, ''], + ['Health care', 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, ''], + ['Education', 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, ''], + ['Entertainment', 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, ''], + ['Transportation', 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ''], + ['Other', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['', '', '', '', '', '', '', '', '', '', '', '', '', ''], + ['Donations', 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, ''], + ['Savings', 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, ''], + ['Gifts', 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ''], + ['Retirement', 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, ''], + ['Other', 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, ''] + ]; +}; + +export function getScienceData() { + return [ + [`
+ An Age Distribution for Scientific Genius +