E-Mail Table

Creating a table to include in your novem e-mails.

Overview

Modern e-mail is a complicated environment to try and create nice looking layouts, and with this in mind we’ve created a collection of novem tables dedicated to e-mails.

  • mtable - mail table, a plain table with some flexible styling

Whilst other novem tables offers a static html output, the email tables are designed specifically to be embedded in e-mails. As such there is less flexibility and more restrictions than with other novem plots.

The mtable serves as a general utility table for adding to e-mails. The goal is to create a compact but nice looking table to include in your e-mails.

An mtable can be created similar to other novem tables by using our api to create a new plot entity of the mtable type.

Structure

The structure and availabel options for a mtable plot.

plot_name                       => Name
├── config                      => Configuration options
│   ├── colors                  => 
│   │   └── colors              => 
│   │   ├── type                => 
│   ├── table                   => table specific settings
│   │   ├── index               => control table index
│   │   ├── size                => size of table xs-lg
│   │   └── cell                => Format table cells
│   │       ├── align           => Number alignment
│   │       ├── border          => control table borders
│   │       ├── text            => Font information (weight, style, color)
│   │       ├── format          => Number and text format
│   │       └── padding         => control table format
│   ├── render                  => 
│   │   └── template            => Template to render against
│   ├── caption                 => Caption below chart
│   ├── theme                   => 
│   ├── title                   => Title of chart
│   └── type                    => bar, sbar, gbar etc...
├── data                        => data to chart
├── description                 => Description (meta)
├── name                        => Name (meta)
└── shared                      => Sharing information
    ├── +org~group              => Shared with an org group
    ├── @username~group         => Shared with a user group
    └── public                  => Shared with everyone

Data

Config

Mail tables have a few different options, the most relevant being size and colors.

For colors you need to set the plot/config/colors/type value to mtable and the content of your plot/config/colors/colors to one of two things:

  • Either a matrix with index and column matching that of your dataset and the content a valid novem color value.
  • Or a a list of indices and colors

The matrix approach allows you to color code individual cells, whilst the list approach allows you to highlight individual rows.

As with other novem colors you can use explicit color codes or one of the predefined “theme” values such as, ok, warn, info, error, bg.

Examples

Below is a collection of common use cases for the mail table along with example code.

Create your first mailtable

Create a simple heatmap

ctrl
/config/type
mtable
ctrl
/config/title
Monthly performance by sector
ctrl
/config/caption
The table above shows the year to date, market cap weighted monthly sector
returns, for the Novem Example Index. For reference, the total index return is
included as well. Information from Yahoo Finance and Nasdaq, calculations by
novem, as of 10^th^ of August 2022.

__*__  This report is calculated mid-month and as such augst is only until 10^th^.

**†** The **Novem Example Index** is provided for reference only.

**N.B.** These numbers are provided as an example of the novem platform only
and should not be relied on for any decision making.
ctrl
/config/colors/type
ix
ctrl
/config/colors/colors
 1:-1   :     bg lin bad-b,neutral,good-b(_,0,_) -- color from 2nd to 2nd to last row
   -1   :     bg lin bad-b,neutral,good-b(_,0,_) -- color last row
ctrl
/config/table/cell/border
   0    :     b 1 inverse -- add a line below the first row (header)
  -1    :     y 1 inverse -- add a line on top of the last row
 
 5     4:6    t 2 red-600 -- Draw red square
 5:7   4      l 2 red-600
 5:7   6      r 2 red-600
 7     4:6    b 2 red-600
 
  :      0    r 1 inverse -- Add vertical lines at beginning
  :      -1   l 1 inverse -- and end
ctrl
/config/table/cell/padding
  :     :     x 1  -- add size 2 padding on left and right side
-1      :     t 1  -- add size 1 padding on the top
 0      :     t 2  -- add size 2 padding on the top
ctrl
/config/table/cell/align
  :    0      <    -- align the left column left
 0     1:     -    -- center the rest of the top row
 1:    1:     >    -- align everything else to the right
ctrl
/config/table/cell/text
 0      :     b    -- bolden the first row
-1      :     b    -- bolden the last row
ctrl
/config/table/cell/format
 1:-1  1:     ,.1% -- format everything except 
                   -- first row and first column as pct
-1     1:     ,.1% -- format last row as pct (skip first column)

Things we need to add:

  • table
    • size
    • index # number, line, square, circle, rect
    • Inline links