Creating tables in AUTOMAIT dashboard

Tables can be created from AUTOMAIT dashboard without pre-defining any data source, by describing the table structure and filling in the values in cells manually through an editor. To do this, you can use the Table Creation Wizard, it also allows importing CSV, Excel or Google Spreadsheets data to editable Tables. Table data for tables created this way will be stored in the database, will always be editable, and can utilize the benefits of server-side processing.

How to create a Simple table in the Decision Manager

‘Simple tables’ can be anything but simple, though, as you can now merge cells, style each cell differently, add star ratings to cells, and so much more.

Until now, creating manual tables was the simplest process in the plugin – you would choose the number of columns, column types, editor input type, predefined values, and so on.

With simple tables, we’ve simplified the process, so to create this table you need to choose the first option on the list – „Create a simple table from scratch“, and click on Next in the bottom right corner.

The next step is to define the table’s name, number of columns and number of rows.

Unlike Manual tables, you don’t need to define column types or choose editor input types for these tables, as Simple tables accept everything, and you’re able to rearrange columns and rows with a simple drag and drop feature. We’ll get to that later on.

After you choose your table’s name and set up the number of columns and rows, simply click on „Generate table“ button, and you’ll be taken to your new, empty table, like the one you see on the left.

You’re welcome to style the table as you want, even before adding content in it, but for this example, we’ll add some AMD and Intel processors’ specifications.

Table Preview – Below every table, you will see how the table will look like on front-end on desktops, tablets and mobile devices. Previews are not live, so when you format the table, you’ll need to click on “Save Changes” in the top right section of the screen in order to see the changes in the preview windows.

Table settings

Just like all other table types, Simple tables have table settings tabs above the table: Edit DataDisplay, and Responsive. This new table type doesn’t have many settings in there (that’s partly why we named them “Simple” tables), but we’ll introduce each tab to you, one by one, in the section below.

Edit Data

Edit Data tab is where you edit the table’s contents, formatting and style. Above the table, you can see available table tools. Most of you understand these tools, but we’ll break them down real quick, in order to help all newbies diving into tables.

 
Let’s stop there for a bit and apply some of these table settings in the table we just created. We’ll apply bold text and set colors you see above to the first row, and we’ll underline the manufacturer in the first column.

CPU

ManufacturerModelSpeedNo. of coresTechnology
AMDRyzen 9 3900XT3.8GHz127nm
AMDRyzen 7 3800XT3.9GHz87nm
Inteli7-1165G72.8GHz410nm
Inteli7-10700K3.8 GHz814nm

There are no limitations to this, so you can play around with background and text colors – formatting each cell individually:

CPU

ManufacturerModelSpeedNo. of coresTechnology
AMDRyzen 9 3900XT3.8GHz127nm
AMDRyzen 7 3800XT3.9GHz87nm
Inteli7-1165G72.8GHz410nm
Inteli7-10700K3.8 GHz814nm

Also, as you can see in the table above, all cells are currently aligned to the middle both vertically and horizontally, so let’s continue explaining available table tools.

  • 12. Word Wrap
  • 13. Insert Link
  • 14. Insert Media
  • 15. HTML code
  • 16. Shortcodes
  • 17. Star Rating
  • 18. Clear Table
  • 19. Merge Cells

A: Word wrap into new lines of the same cell
B: Overflow over next cell(s)
C: Clip – cut off the text when it reaches the cell’s border with …

Selection_999(2001)
 

Most tools are also available if you right-click on the table.

An advantage of this table type is the ability to reorder and resize rows and columns freely. To reorder them, simply click on rows or columns you wish to move, and you’ll see the cursor change to a hand. Then you can drag and drop the selection, as shown in the GIF below:

Table can be navigated through using keyboard shortcuts as well:

Navigation:
Arrow Up ↑ – move to the cell above the current active cell (if it exists)
Arrow Down ↓ – move to the cell below the current active cell (if it exists)
Arrow Left ← – move to the cell on the left of the current active cell (if it exists)
Arrow Right → – move to the cell on the right of the current active cell (if it exists)
Tab – move to the cell on the right side of the current active cell (if it exists)
Tab + Shift – move to the cell on the left side of the current active cell (if it exists)
Home – Move to the first cell in a row
End – Move to the last cell in a row
Ctrl + Home – move to the first cell in a column
Ctrl + End – move to the last cell in a column

Selection:
Ctrl + A – select all
Shift + Arrow Up ↑ – extend selection of the cell above
Shift + Arrow Down ↓ – extend selection of the cell underneath
Shift + Arrow Right → – extend selection of the cell on the right
Shift + Arrow Left ← – extend selection of the cell on the left
Shift + Home – select all cells in the row to the left, including the current cell
Shift + End – select all cells in the row to the right, including the current cell
Ctrl + Shift + Home – select all cells in the column to the top including the current cell
Ctrl + Shift + End – select all cells in the column to the bottom including the current cell

Editor:
Enter – open/close cell editor
F2 – open cell editor
Esc – cancel editing and close cell editor
Backspace – empty cell
Delete – empty cell
Ctrl + C – copy cell‘s content
Ctrl + X – cut cell‘s content
Ctrl + V – paste cell‘s content
Ctrl + Enter – fill all selected cells with edited cell‘s value
Ctrl + Z – undo
Ctrl + Y – redo

Display

The “Display” tab provides 4 options.

  • Table Title check-box allows you to have the title of the table displayed above it, and it is enabled by default. You can see “CPU” in the star-rating example above, which represents the table’s title above the page.
  • Header checkbox, when enabled, marks the first row of your table as columns’ header. Its default background color is set to light-gray, but you can change that freely using the table tools above the table.
    If you have merged cells in first and second column, this option will become unavailable automatically.
  • Stripe Table checkbox paints odd rows in light gray, so it’s easier to follow columns through a row. That feature is enabled by default in other table types, but with Simple tables, you can choose whether you’re going to use it.
  • Cell Padding (in px). Here you can set the padding inside all cells. The default value is 10px.

Responsive

The “Responsive” tab also provides 4 options.

Enabling the responsive mode basically pivots columns into rows. If you don’t enable the option to use the first row as table header, each cell will be located in a separate row.

When column headers are enabled, on tablets and mobiles the table is split into 2 columns and as many rows as there are columns, only repeated for every new row in the table. For example, when Responsive mode and column headers are enabled, the table will look like this on tablets and mobiles.

Also, when this is enabled, „Scrollable“ and „Limit table width“ check-boxes will be disabled. These two features work just like in any other Table, so if you enable „Scrollable“, „Limit table width“ will disappear, and if you enable „Limit table width“ a new option – „Word Wrap“ will be enabled, and „Scrollable“ will disappear from the page.

Horizontal scroll allows you to scroll through the table horizontally, which may come in handy for larger tables.

Limit Table Width sets the table’s width to fit the page, widget or the container in which the table is added.

When vertical scroll is enabled, you will be able to set its height on the page.

The number defined here is in pixels, so there‘s no need to add „px“ at the end.

Additional Notes

To add these tables on front-end, you can use the shortcode next to the title:

Or you can use blocks in classic and Gutenberg editors, or within page builders:

How to create editable tables manually

Creating tables

One of most common uses of Tables is to create tables, and fill them with data taken from the AUTOMAIT dashboard, without accessing or having any pre-existing data source available (Excel, CSV, Google Spreadsheet, MySQL DB, etc.). The editable table you create will be stored in MySQL, and you will be able to edit it at an any later time, or make it available for editing from the front-end.

We’ll go through the table creation process together, and explain all the available options as we proceed.

To start creating a table manually, open your AUTOMAIT dashboard, go to Tables -> Create a Table, choose the second option “Create a table manually”, and click “Next“:

Configure table structure

You will be shown the wizard step that will assist you to create the table structure (Note: if during any step, you notice that you’ve made a mistake, click “Previous” and go back):

Going through the elements in detail:

  1. Table name input – here you can define a table name that will enable you to identify this table among any other Tables. This table name can be redefined at any later time.
  2. Number of columns input – provide the number of columns that your table will have (e.g. enter 10, if you plan to have 10 columns). Another option you can use to change the column numbers is to add them with the button (element #9) or remove them with the X button (element #8). You can always add or remove columns later, after the table has been created.
  3. Column block – column blocks represent columns of your future table; one block stands for one column.
  4. Column header – with this input, you define the header that will identify the column; it will be visible in the frontend.
  5. Column type – this input defines the data type of the column, the filter type for the column, and the editor input type.
  6. Editor predefined value. This is an optional input, that allows you to define a default value of the column which will be pre-filled in the editor inputs, and in the filter inputs (this can be disabled). If the column type is One-line selectbox, or Multi-line selectbox, and some possible values are defined (see point #7), this input will become a dropdown of the possible values.
  7. Possible values. This is a “taggable” input, which appears only for One-line selectbox and Multi-line selectbox types. Here you can define all the possible values, separating them with a comma.
  8. “X” / Remove column block button. This button removes a column block. Using it can be more convenient than changing the column number with an input.
  9. Add column button. This button adds one more column block.
  10. Create the table. This is a dropdown button with options to choose an editor type. After choosing one, it creates the table on the MySQL side, creates a Table, and opens the chosen editor type, from which you can start editing the table data.

Column type options:

  • One-line string. This is the most “simple” text type. It is suitable for short strings. The generated column will have a “string” (“text”) data type, a one-line text input filter type, and a one-line text input editor input type in the editor.
  • Multi-line string. This text type option is suitable for longer strings. The generated column will have a string data type, a one-line text input filter type, and a multi-line editor (“memo”) input type.
  • One-line selectbox. This option is for columns, in which cells can have one of several possible options as a value (e.g. colors: “red”, “green”, “blue”). The generated column will have a string data type, a select box filter, and a select box editor input.
  • Multi-line selectbox. This option is for columns, in which cells can have several of possible options as a value at one time (e.g. purchased modules: module 1, module 2, module 3). The generated columns will have a string data type, a select box filter, and a multi-selectbox editor input.
  • Integer. This option is for integer numeric columns. The generated column will have an integer data type, a number filter, and a text/numeric editor input.
  • Float. This option is for float numeric columns. The generated column will have a float data type, a number filter, and a masked text/numeric editor input.
  • Date. This option is for date columns. The generated columns will have a date data type, a date range filter, and a datepicker editor input.
  • DateTime.  This option is for DateTime columns, when both the date and the time is necessary. The column will have a DateTime data type, a DateTime range filter, and a DateTime editor input.
  • Time. This option is for having the time stored in the column in either a 12H or 24H format. The column will have a Time data type, a Time range filter and a Time editor input.
  • URL link. This option is for URL link columns. The generated columns will have a URL link data type, a text filter, and a text editor input with URL validation.
  • E-mail link. This option is for E-mail columns. The generated columns will have an e-mail link data type, a text filter, and a text editor input type with E-mail address validation.
  • Image. This option is for image columns. The generated columns will have an Image data type, no filter, and a text editor input.
  • Attachment. This option is for attachment columns. The generated columns will have a “URL link data type”, no filter, an a “Browse media library” input to attach files.

Configuring an example table

Let’s configure an example table and fill it in with some data.

We use this configuration for columns (a dummy clients table):

  1. Company name, type: a one-line string
  2. Sector, type: a one-line selectbox, possible values are: “Architecture, Business Consulting, Construction, Technology, IT”
  3. Yearly revenue, type: float
  4. Client since, type: date

When you have finished configuring the table, click “Create the table”. A dropdown will open with options to open the table in a standard editor or an Excel-like editor.

Inserting table on post or page

Once you’ve filled in some values in the table, the procedure of inserting it in your post or page is simple. Open (or create a new) post or page, place the cursor in the position where you would like to insert the table, click the “Insert a wpDataTable” button in the editor, and locate the newly-created table.

Another option is to copy&paste the table shortcode manually (you can see it in the back-end editor).

That’s it! Not complicated at all!

Creating editable tables by importing data from Excel, CSV or Google Spreadsheets

 

In this tutorial, we will learn how to create editable tables from an Excel or CSV imported data, or from a Google Spreadsheet using DataTables WordPress plugin. Let’s watch a live demo of the imported table first, and then go through the steps needed to create it.

In many cases, you might have an initial file with the table data, but this table needs to be regularly updated (e.g. if it is a price list, a catalog, etc.). wpDataTables has two options here for you:

  1.  Creating tables linked to existing data source, in which case you will upload the file and initialize the table, whereupon it will be read every time on page load. Then you can overwrite this file to update the data. Such tables won’t be editable within WordPress, and if they are larger than 3000-5000 rows, the page load and generation time will be slow.
  2. Importing table data to WordPress. The initial data will be read and imported from the provided file or a Google Spreadsheet. You can select to skip certain columns, or add columns. You can edit both the structure and the data within the table at an any point later, but the table won’t be synced with the source file as is the case with the first option; e.g., if you change something in CSV or in source Google Spreadsheet, your Table data will stay the same because the data will be already imported to the database.

In this tutorial, we will learn how to create a editable tables from an Excel or CSV imported data, or from a Google Spreadsheet. Let’s watch a live demo of the imported table first, and then go through the steps needed to create it.

 
CompanyPhone numberCreation dateSector
Cursus In Incorporated(002) 4572644125/11/2003IT
Adipiscing Company(00606) 774200822/09/2005IT
Adipiscing Lacus Corporation(05646) 468313108/07/2008IT
Pede Company(04752) 414533924/12/2007IT
Ut Cursus Luctus Institute(068) 4024152302/01/2002IT
Felis Limited(001) 9149796113/07/2004IT
Sit Amet Industries(087) 1737034615/01/2013IT
Non Arcu Vivamus Associates(0406) 8275465121/05/2015IT
Blandit Congue In Limited(07333) 615507202/08/2010IT
Tortor Company(035889) 95680304/04/2008IT
 

Create a wpDataTable and import your CSV file

Go to Rules & Metrics -> Create a Table and choose Create a table by importing data from data source option.

File upload

The next step will be to locate the file you want to import using the WordPress Media Library. Click on the “Upload” button to open the Media Library and choose your CSV or Excel file:

We will use this CSV file to create an editable table. You can download it and use it as well. Importing Excel files is also supported (XLS, XLSX).

To get from Excel to AUTOMAIT, you can either upload the file using the Media Library, or browse the file that was previously uploaded. After selecting the file click the “Choose file” button.

Google Spreadsheet Configuration

If you want to use a Google Spreadsheet first you need to prepare the table data in a Google Spreadsheet. Then Go to File -> Publish to the web and click “Publish”. Copy this link from your browser since you will use it in Tables and paste it in “Input file path or URL”.

 

Table configuration

Now, Tables will need to “take a look” at the source to initialize the table structure before we can create the actual Table. To do this, click “Next”. Tables will initialize the column metadata and show you the pre-import table setup screen:

In this screen, you can configure the columns that will be imported, reorder the columns, or skip some columns during the import. You can also change the data type, and even add more columns.
The table name input will be used for Table name that will help you to identify it later, and can optionally be displayed in the page above the table.
To reorder the columns during the import, drag & drop the column blocks with the mouse.
To remove (ignore) some columns during the import, just click the “trash can” button in the top right of the column block.
To add a column, click the “Add column” button after the column blocks.

For each column you can redefine/define:

Column header – this is a header that will be shown above each column.

Type – this is a single selectbox that defines the column data type, editor input type for the back-end (and front-end) editor, and the filter type.
Possible options:

  • One-line string. This is the simplest text type suitable for short strings. The generated column will have a “string” (“text”) data type, a one-line text input filter type, and a one-line text input editor input type in the editor.
  • Multi-line string. Another option for a text type. This is suitable for longer strings. The generated column will have a string data type, a one-line text input filter type, and a multi-line editor (“memo”) input type.
  • One-line selectbox. This is an option for columns, where cells can have one of several concurrent options as a value (e.g. colors: “red”, “green”, “blue”). The generated column will have a string data type, a select box filter, and a select box editor input.
  • Multi-line selectbox. This is an option for columns, where cells can have several concurrent options as a value (e.g. purchased modules: module 1, module 2, module 3). The generated columns will have a string data type, a select box filter, and a multi-selectbox editor input.
  • Integer. This is an option for integer numeric columns. The generated column will have an integer data type, a number filter, and a text/numeric editor input.
  • Float. This is an option for float numeric columns. The generated column will have a float data type, a number filter, and a masked text/numeric editor input.
  • Date. This is an option for date columns. The generated columns will have a date data type, a date range filter, and a datepicker editor input.
  • URL link. This is an option for URL link columns. The generated columns will have an URL link data type, a text filter, and a text editor input with URL validation.
  • E-mail link. This is an option for E-mail columns. The generated columns will have an e-mail link data type, a text filter and a text editor input type with E-mail address validation.
  • Image. This is an option for image columns. The generated columns will have an Image data type, no filter, and a text editor input.
  • Attachment. This is an option for attachment columns. The generated columns will have a “URL link data type”, no filter, and a “Browse media library” input to attach files.

Default value. This is an optional input, where you can define a default value of the column which will be pre-filled in the editor inputs, and in the filter inputs (which can be disabled). If the column type is One-line selectbox, or Multi-line selectbox, and some possible values are defined (see point #7), this input will become a dropdown of the possible values.

Possible values. This is a “taggable” input, which appears only for One-line selectbox and Multi-line selectbox types. Here you can define all the possible values separating them with a comma.

Data preview shows the data preview (first 4 cells) for the initialized columns. Data preview does not show up for manually added column blocks.

To create the Table, click the “Create table” button. A dropdown will appear, where you can choose whether you prefer to open the table in the standard editor, or in an Excel-like editor. After choosing one, the Table will be generated, and you will be redirected to the back-end editor.

Creating editable tables in the Decision Manager

 

There are 2 primary ways to create editable Tables:

  • Create the tables manually or 
  • Import the table data from Excel or CSV

Tables created manually with Table Constructor are back-end editable by default; to allow front-end editing, simply open the “Editing” tab in the table configuration settings, click the  “Allow editing” option, and click the “Apply” button (the ID column and the table name will be pre-configured for this type of tables by default).

Your front-end users will then be able to edit the table data.

Frontend editing

wpDataTables Configurating Editable Tables

When the table is saved, and inserted in the post or page, the look of the table in the front-end is slightly different from that of a typical non-editable table. You’ll see three new buttons in the TableTools section of the table (or just these three if you didn’t enable TableTools for this Table).

Manual tables will be always editable on the table configuration page, and you will always see these three buttons independently from the “Allow editing” feature.

It is also possible to select a row in the table by clicking on it. When you do so, the row will become highlighted (you can change the highlight color along with other table colors in the table settings page).

To make editing possible, you need to choose editor input types for the columns we want to allow users to edit. For this, you need to open the column configuration panel by clicking on “Column settings” button wpDataTables column settings or by clicking the “Complete column list”  button wpDataTables complete column list which enables you to open the column configuration for each column you want to make editable. Then, you need to make a selection in “Editor input type” dropdown under the “Editing” tab.

When the editor input types are chosen and saved, you can return to the table front-end (open the post or page where you inserted the table), choose any row, and click “Edit“; or click “New” to create a new entry. You will see an editor popup. The popup is responsive, so it will work correctly on mobile and tablet devices as well.

  • In the left side of the editor popup you will see the names of the columns.
  • On the right side of the editor popup you will see the editor inputs for the cells.
  • On the bottom side, you will see the control and navigation buttons. Cancel – discards all changes and closes the editor popup.
    • << Prev – selects the previous row of the table, unless the first one is selected. If necessary, it switches to the previous page, and puts the data from this row in the front-end editor. Changes that were not saved will be discarded.
    • Next >> – selects the next row of the table, unless the last one is selected. If necessary, it switches the table to the next page, and puts the data from this row to the front-end editor inputs. Changes that weren’t saved will be discarded.
    • Apply and add new – saves the data from the editor in the current row, it doesn’t close the popup, but opens a new editor with the blank input fields.
    • OK – saves the data from the editor in the current row, and closes the editor popup.
    • Right top “X” button is equal to “Cancel” – this discards all unsaved changes and closes the popup

When you click “Save” or “OK“, data is first validated and then sent to MySQL engine. If the data is invalid, or MySQL returns an error, you will see an error message which tells you which field is problematic and what you need to change.

While the data saving is in progress, you will see an overlay indicating that the process is going on in the background. If the data is sent correctly, you will see a success message.

wpDataTables Configurating Editable Tables

Calculating totals, minimum, maximum and average values in Tables

For many cases, it is useful to calculate a sum, average, minimum and maximum of all the values for a given column. For example, total sales within a month, the total price of products in an order, calculating maximum profit, minimum wage, average grade etc. the Decision Manager supports a sum / totals, average, minimum and maximum row for numeric columns, see this table as an example, and try to filter it by a date range to see how the totals recalculate:

DateHeinekenAmstelTuborgCarlsberg
09/01/2019956441299268
10/01/2019534279987524
11/01/2019713956898343
12/01/2019748416137466
09/02/2019239967629453
10/02/2019822326753800
11/02/2019522367215138
12/02/2019528721623320
09/03/2019483609689451
10/03/2019290435476984
 ∑ = 54,387∑ = 55,148∑ = 57,774∑ = 52,211
 Avg = 543.87Avg = 551.48Avg = 577.74Avg = 522.11
 Min = 105Min = 108Min = 106Min = 104
 Max = 997Max = 967Max = 1,000Max = 984
 

Adding all these features is simple. In the column settings, click on the Data tab and check the Calculate checkboxes for the selected column you want to calculate these functions.

Calculation functions

If these checkboxes are checked for at least one row, a functions row will appear in the bottom.
Functions are recalculated on table redraw (i.e. when you filter).

Also take note of the shortcode below each calculated function.

Calculating shortcode

By pasting the shortcode, you can display the results of the functions somewhere outside the table, or you can paste this code in a cell belonging to another table.
To achieve this you will need to check the Parse shortcodes option on the wpDataTables Settings page.

Calculating shortcode2
  1. Go to your AUTOMAIT dashboard, Rules & Metrics
  2. Click on Settings
  3. Check the “Parse shortcodes” checkbox
 
 

Formula (calculated) columns

If your dataset used for Table creation is not comprehensive – if for example, it shows only the price without VAT tax, or you need a column showing a result of calculation based on other columns’ cell values, you can use the formula (calculated) columns.

See this table: “Tax” and “Difference” columns do not exist in the dataset. They are calculated “on the fly” using the formula columns feature.

RegionTypeNet costCatalog costTaxDifference
ABTyneside flat93,474102,82118,507.7827,854.78
ABTyneside flat57,50863,25911,386.6217,137.62
ABTyneside flat28,32631,1595,608.628,441.62
AlajuelaApartment76,98484,68215,242.7622,940.76
ANTerraced house38,22942,0527,569.3611,392.36
AndalucíaTyneside flat83,48591,83416,530.1224,879.12
BAGarden flat53,86159,24710,664.4616,050.46
BATerraced house67,92974,72213,449.9620,242.96
BCGarden flat99,087108,99619,619.2829,528.28
BCFlat47,77452,5519,459.1814,236.18
 
  
 

Add a formula column

Any table can have a formula column. To add one, you can click the “Add a formula column” button:

Formula Image

Formula constructor

After you click the “Add formula a column” button, you will see a popup formula constructor. It has a fixed name ‘formula_1’, ‘formula_2’, etc. – depending on the amount of formulas that you added.

The formula constructor popup has several main elements:

  1. Columns that can be used in the formula. Please note that only numeric (float and integer columns) can be used in formula columns.
  2. Formula. The created formula itself.
  3. Supported operators. Formulas in Tables support all arithmetic operators, brackets to define the calculation order, and trigonometric operators.
  4. Preview button and preview section. Once you prepare the formula, you can click this button to see the result for the first 5 rows of your table to verify the calculation is correct.

Additionally, there is an explanation text on the top.

You can use columns (values for each cell will be inserted), or number values. Only numeric columns are allowed (non-numeric will be parsed as 0). Basic math operations and brackets are supported. Example: col1*((col2+2)-col3*sin(col4-3)).

Formula image 3

To calculate the “Tax” column in the above example, we can simply use the catalog cost column value, multiply it by some number, and click “Save“.

Formula image 4

Now let’s change the displayed header of the formula column. To do that, click the button for column settings.

Formula Image 5

Enter the new value in the “Displayed header” input in the first tab column setting and click apply.

Formula image 6

If you want to change the formula for a calculation you can go to the “Data” tab and click on the “Open Formula Editor” button.
After you click on THE “Open Formula Editor” button, the formula constructor popup will appear. You can use it to adjust the formula that is used for calculation.

Formula image 7

Formula columns can be easily deleted by clicking the “Delete” button in the column header area in the live table preview.

There are several limitations when using formula columns in Tables:

  1. One formula column cannot be used in another. This limitation can be avoided by using nested calculations.
  2. In tables with server-side processing formula, columns cannot be used for grouping, filtering, and sorting. Basically, formulas are calculated only for the rows that are immediately visible; Therefore, it’s not possible to “know” the values for currently invisible rows. Please note that this also applies to the “Manual” tables, as they also use server-side processing by default. Also, of course, it is not possible to edit the cells generated by formulas in the editable tables.
  3. Adding a sum in the sum row for formula columns is not yet supported.
  4. Using calculation functions in formula columns is not possible
 

How to create charts with a simple wizard

 

See the steps needed to create a responsive chart in AUTOMAIT using the Chart Creation Wizard of the Decision Manager, a very easy step-by-step generator.

On each step you can go back to change the settings. In the “Formatting and preview” step, you can see a live chart preview, so you can check if you’re satisfied with the look of the chart before saving it and inserting it to a WordPress post or page. You can see the current step in the upper part of the screen in the breadcrumbs.

Chart title & type

To open the Chart Creation Wizard, open your AUTOMAIT dashboard and go to Rules & Metrics -> Create a Chart, where you will define a chart name that will help you to identify it later, and choose one of the render engines – Google ChartsHighcharts or Chart.js.

Creating charts with wpDataTables
Creating charts with wpDataTables

When you choose the rendering engine, the Decision Manager will show a list of possible chart types, the list varies depending on the engine. For this example, we will use the Highcharts area chart. After you choose the chart, click Next to go to the next step.

Data source

On the “Data source” step you will need to define the table that will be used as the data source for the new chart. This is done with a simple selectbox.

Creating charts with wpDataTables

Data range

Creating charts with wpDataTables

On the “Data range” step, you will need to provide the data range for the future chart. This consists of several blocks. The first block is the Column range picker.

In the column range picker, you can select the table columns that will be used in the future chart. In the left container you can see a list of all the columns that the table has, with their names and data types. The items of this list can be clicked to be selected; also, there are “Select all” and “Deselect all” shortcuts above them. The right container represents the list of columns that will be used in the chart. The items in this list can be drag&dropped for reordering. Add allAdd selectedRemove selectedRemove all buttons are between the two containers. These allow adding columns to the chart or removing them. The right container also displays hints if an incorrect amount or incorrect type of columns for the chosen chart type was selected (e.g., it shows that there are not enough columns added for the selected chart type).

Next block is the Row range picker block:

The Decision Manager allows you to choose not only the columns that will be used in the chart in the WordPress front-end, but also the rows. By default, it is set to “All rows“, but you can choose individual rows or row ranges as well. For this, choose “Pick range” in the dropdown, and click on the “Range picker…” button that appears.

Creating charts with wpDataTables

When you click on the “Range picker…” button, the row range picker popup will appear.

Range picker shows the data of your table, and you can select the cells that you would like to use in the chart there.

There are 2 options to pick a range:

  • Click&drag (Excel-like): click on a cell that you want to set as a range start, and move your mouse (e.g., diagonally) to the cell that you want to set as the range end. It will also override the columns you chose in the column range picker if the column set will be different.
  • Use checkboxes above the columns and to the left of rows. All rows and columns that have checkboxes checked are for the range. Column range can be overridden with this option as well.

When you’re done, click “OK“, and the range will be saved (see the hint below the dropdown which will show the number of selected rows).

The last option on this step is the “Follow table filtering” checkbox. It is available only if you choose to use “All rows” in the “Row range” selectbox.

wpDataCharts follow table filtering

Formatting and previewCreating charts with wpDataTables

When the data range is chosen, you can click Next to proceed. The next step is “Formatting and preview“. Changes that are made on the chart are instantly visible on the chart that is rendered on the right side of the screen. The formatting step is divided into categories representing different chart elements.

In the first category you can change basic chart options like:

  • Chart width – The width of the chart
  • Chart height – The height of the chart.
  • Responsive width – If you tick this, chart width will always adjust to 100% of the width of the container
  • Group chart – If you tick this checkbox, the values of the rows with the same label will be summed up and rendered as a single series. If you leave it unticked, all the rows will be rendered as a separate series.
  • Background color – The background color for the tooltip.
  • Border width – The pixel width of the outer chart border.
  • Border color – The color of the outer chart border.
  • Border radius – The corner radius of the outer chart border.
  • Zoom type (Highcharts only) – This decides in which dimensions the user can zoom by dragging the mouse.
  • Panning (Highcharts only) – Allows panning in a chart. This is best used with Pan key to combine zooming and panning.
  • Pan key (Highcharts only) – Allows setting a key to switch between zooming and panning.
  • Plot background color – The background color or gradient for the plot area
  • Plot background image  (Highcharts only) – The URL for an image to use as the plot background.
  • Plot border width – The pixel width of the plot area border.
  • Plot border color – The color of the inner chart or plot area border.
  • Font size (Chart.js and Google Charts only) – The default font size, in pixels, of all text in the chart.
  • Font name (Chart.js and Google Charts only)- The default font face for all text in the chart.

In the “Series” category you can customize actual series options for series that are used in the chart:

  • Label
  • Color
  • Curve type (Google Line Chart only, Chart.js Line and Area)
  • 3D (Google Pie Chart only) – If true, a three-dimensional chart is displayed.
Creating charts with wpDataTables
Creating charts with wpDataTables

The “Axes” section describes chart axes options; the X(H) axis or category axis and the Y(V) axis or value axis. Options that are available for axes are:

  • Grid
  • Grid line style (Highcharts only) – The dash or dot style of the grid lines
  • Horizontal axis label – Name of the horizontal axis
  • Horizontal crosshair (Highcharts and Google Charts only)- Configures a horizontal crosshair that follows either the mouse pointer or the hovered point lines
  • Horizontal axis direction  (Google Charts only)
    – The direction in which the values along the horizontal axis increase. Specify -1 to reverse the value order
  • Vertical axis label – Name of the vertical axis
  • Vertical crosshair – Configures a vertical crosshair that follows either the mouse pointer or the hovered point lines
  • Vertical axis direction (Google Charts only) – The direction in which the values along the vertical axis increase. Specify -1 to reverse the order of the values
  • Vertical axis min value – The minimum value of the axis
  • Vertical axis max value – The maximum value of the axis
  • Invert – Enables inverting the axes, so that the x axis is vertical, and the y axis is horizontal

The chart’s main title options:

  • Show/Hide Chart title
  • Title floating (Highcharts and Google Charts only)- When the title is floating, the plot area will not move to make space for it
  • Title align  (Highcharts only) – The horizontal alignment of the title
  • Subtitle  (Highcharts only) – The chart’s subtitle
  • Subtitle align  (Highcharts only) – The horizontal alignment of the subtitle
Creating charts with wpDataTables
Creating charts with wpDataTables

Options for the tooltip that appears when the user hovers over a series or point:

  • Enable/Disable Tooltip
  • Background color (Highcharts and Chart.js only)  – The background color for the tooltip
  • Border width (Highcharts only)  – The pixel width of the tooltip border
  • Border color (Highcharts only) – The color of the tooltip border
  • Border radius (Highcharts and Chart.js only) – The radius of the rounded border corners
  • Shared tooltip (Highcharts and Chart.js only) – When the tooltip is shared, the entire plot area will capture mouse movement or touch events
  • Value prefix (Highcharts only) – A string to prepend to each series’ y value
  • Value suffix (Highcharts only) – A string to append to each series’ y value

The legend is a box containing a symbol and name for each series item or point item in the chart:

  • Enable/Disable Legend (Highcharts and Chart.js only)
  • Background color (Highcharts only) – The background color of the legend
  • Title (Highcharts only) – A title to be added on top of the legend
  • Layout (Highcharts only) – The layout of the legend items
  • Align – The horizontal alignment of the legend box within the chart area
  • Vertical align – The vertical alignment of the legend box
  • Border width (Highcharts only) – The width of the drawn border around the legend
  • Border color (Highcharts only) – The color of the drawn border around the legend
  • Border radius (Highcharts only) – The border corner radius of the legend
  • Legend position – The position of the legend. Possible values are ‘top’, ‘left’, ‘bottom’ and ‘right’
Creating charts with wpDataTables
Creating charts with wpDataTables

The “Exporting” category defines the exporting module that allows your users to download the chart as PDF, PNG, JPG or SVG vector images (Highcharts only):

  • Enable/Disable Exporting
  • Data labels – Add data labels to improve readability of the exported chart
  • File name – The filename, without extension, to use for the exported chart
  • Width – The width of the original chart when exported
  • Button align – Alignment for the export button
  • Button vertical align – The vertical alignment of the export button
  • Button color – The color of the symbol’s stroke or line
  • Button text – A text string to add to the individual button

Credits label in the lower right corner of the chart

  • Enable/Disable Credits
  • Credits href – The URL for the credits label
  • Credits text – The text for the credits label

You can experiment with the settings and click Next to see the chart preview. If you’re not satisfied, you can always go back and change these settings:

Creating charts with wpDataTables

Save and get shortcodeCreating charts with wpDataTables

When you’re satisfied with the preview, click Next again so your chart will be saved in the WordPress database, and a shortcode will be generated for you. Click on the shortcode button, and the shortcode will be directly saved to your clipboard. 

Insert the Chart in your page 

To insert the chart in a page you simply copy the generated shortcode, and insert it in your page where you need it.