Skip to content

Fields

configurations/fields.js

The fields file contains all the possible fields for the front-end report pages. Each field represents a Tastypie field within a resource, and appear as both dimensions and metrics in the LayoutTableGraph component's table and graph.

Required Properties

Property
Description
rawName This must match the name of the field in the Tastypie resource.
displayName This is the name that will appear in the table headers and graph dropdown.
defaultOrderDir The default order direction for the data in the table column (asc/desc) if it as selected as the default field to order by in the resource.

Optional Properties

Property
Description
isDimension Set this property to 'true' when the field will serve as a dimension in the table. This allows additional styles to be applied to the table cell/column that contains the dimension (such as the fixed column).
description Some fields require a short description to assist clients with understanding the metrics they are viewing. The description will appear as a hoverable tooltip in the table header:

The description tooltip for 'Cubed Sales'

lookupTerm When a field is set as a foreignkey to the resource, you may need to specify a lookup term, which represents which field you would like to display from the foreign key's resource. for example, referer__name=SEO, pattern__pattern=*google*.
fixedWidth You can specify a fixed width for the table column for your field. This is usually used to allow more room for longer data.