Skip to content

Commit

Permalink
add section headers
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdraves committed Jun 19, 2018
1 parent 8b907d0 commit 4757230
Showing 1 changed file with 55 additions and 44 deletions.
99 changes: 55 additions & 44 deletions doc/groovy/TableAPI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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,
Expand Down Expand Up @@ -70,6 +77,13 @@
"display.setStringFormatForTimes(TimeUnit.HOURS)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Bar Charts Renderer"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -87,6 +101,13 @@
"display2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Column Visibility and Placement"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -111,6 +132,13 @@
"display3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Heatmaps"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -132,6 +160,13 @@
"display4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cell Background Color"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -152,6 +187,13 @@
"display5"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Heatmaps per Column"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -179,6 +221,13 @@
"display6.removeAllCellHighlighters()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Color Unique Entries"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -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"
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -451,7 +462,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Update cell"
"## Seamless Update"
]
},
{
Expand Down

0 comments on commit 4757230

Please sign in to comment.