E-Mail Table
Creating a table to include in your novem e-mails.
AI-assisted, human-approvednovem uses AI to review and keep our documentation up to date.
Overview
The mtable plot type produces a table for embedding in e-mails. It supports
cell formatting, alignment, borders, and colours within the constraints of
e-mail clients. Create a plot and set config/type to mtable.
Structure
The structure and available 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
An mtable takes the same tabular data as any other novem table. The simplest
way to supply it is as CSV written to the data endpoint: the first row holds
the column headers and the first column is the row index (its header cell is
normally left blank).
,Date,AUM
Example Fund A,2024-07-31,1400000000
Example Fund B,2024-07-31,400000000
The data stays plain numbers and text — number formatting, alignment, borders
and colors are all layered on top through the config/table options described
below.
Config
Use config/table/cell/ for alignment, borders, formatting, padding, and
other cell settings. Write colour instructions to
config/colors, using
row and column selectors followed by a colour or scale.
Examples
Below is a collection of common use cases for the mail table along with example code.
Create your first mailtable
The minimum is a plot of type mtable with some data. Set the type:
mtable
and write a data file:
,Date,AUM
Example Fund A,2024-07-31,1400000000
Example Fund B,2024-07-31,400000000
The table is now available at /u/<your_username>/p/<plot_name> and can be
embedded in an e-mail with a
{{ vis }} block:
{{ vis
ref: /u/<your_username>/p/<plot_name>
}}
The examples below layer title, caption, colors and cell formatting on top of this baseline.
Create a simple heatmap
mtable
Monthly performance by sector
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 august is only until 10^th^.
**†** The **Novem Example Index** is provided for reference only.
**Note:** These numbers are provided as an example of the novem platform only
and should not be relied on for any decision making.
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
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
: : 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
: 0 < -- align the left column left
0 1: - -- center the rest of the top row
1: 1: > -- align everything else to the right
0 : b -- bolden the first row
-1 : b -- bolden the last row
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)