From 47572305cb073d043316aecdff98d03da94bbe30 Mon Sep 17 00:00:00 2001 From: Scott Draves Date: Tue, 19 Jun 2018 15:19:43 -0400 Subject: [PATCH] add section headers --- doc/groovy/TableAPI.ipynb | 99 ++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/doc/groovy/TableAPI.ipynb b/doc/groovy/TableAPI.ipynb index f6f87632f3..99b7272846 100644 --- a/doc/groovy/TableAPI.ipynb +++ b/doc/groovy/TableAPI.ipynb @@ -10,7 +10,7 @@ "\n", "There is a menu in the top-left for the whole table, and each column has a menu that appears on hover.\n", "\n", - "There are also keyboard commands: digits change the precision of all columns, shift-digit changes the precision of the current column. Arrow keys navigate. " + "There are also keyboard commands: digits change the precision of all columns, shift-digit changes the precision of the current column. Arrow keys navigate, and the page up/down keys work too." ] }, { @@ -22,6 +22,13 @@ "new TableDisplay( new CSV().read(\"../resources/data/interest-rates.csv\"))" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Formatting and Alignment" + ] + }, { "cell_type": "code", "execution_count": null, @@ -70,6 +77,13 @@ "display.setStringFormatForTimes(TimeUnit.HOURS)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Bar Charts Renderer" + ] + }, { "cell_type": "code", "execution_count": null, @@ -87,6 +101,13 @@ "display2" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Column Visibility and Placement" + ] + }, { "cell_type": "code", "execution_count": null, @@ -111,6 +132,13 @@ "display3" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Heatmaps" + ] + }, { "cell_type": "code", "execution_count": null, @@ -132,6 +160,13 @@ "display4" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Cell Background Color" + ] + }, { "cell_type": "code", "execution_count": null, @@ -152,6 +187,13 @@ "display5" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Heatmaps per Column" + ] + }, { "cell_type": "code", "execution_count": null, @@ -179,6 +221,13 @@ "display6.removeAllCellHighlighters()" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Color Unique Entries" + ] + }, { "cell_type": "code", "execution_count": null, @@ -203,48 +252,10 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], - "source": [ - "def mapList4 = [\n", - " [a:1, b:2, c:3],\n", - " [a:4, b:5, c:6],\n", - " [a:7, b:8, c:5]\n", - "]\n", - "def display7 = new TableDisplay(mapList4)\n", - "\n", - "//set what happens on a double click\n", - "display7.setDoubleClickAction { row, col, tableDisplay ->\n", - " tableDisplay.values[row][col] = tableDisplay.values[row].sum()\n", - "}\n", - "//run tagged cell on action\n", - "//display7.setDoubleClickAction(\"misc_formatting\");\n", - "\n", - "\n", - "//add a context menu item\n", - "display7.addContextMenuItem(\"negate\") { row, col, tableDisplay ->\n", - " tableDisplay.values[row][col] = -tableDisplay.values[row][col]\n", - "}\n", - "\n", - "//run tagged cell on action\n", - "//display7.addContextMenuItem(\"negate\", \"misc_formatting\");\n", - "\n", - "display7" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "tags": [ - "misc_formatting" - ] - }, - "outputs": [], "source": [ - "Math.random()" + "## Font Size, Color, and Vertical Headers" ] }, { @@ -267,11 +278,11 @@ "td4\n", "\n", "//set the font size and color\n", - "td4.dataFontSize = 15\n", + "td4.dataFontSize = 35\n", "td4.headerFontSize = 30\n", "\n", "def colors = [[Color.LIGHT_GRAY, Color.GRAY, Color.RED],\n", - " [Color.YELLOW, Color.ORANGE, Color.RED],\n", + " [Color.DARK_GREEN, Color.ORANGE, Color.RED],\n", " [Color.MAGENTA, Color.BLUE, Color.BLACK]]\n", "\n", "td4.setFontColorProvider { row, col, td ->\n", @@ -451,7 +462,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Update cell" + "## Seamless Update" ] }, {