|Summary||This article describes how to customise an askiavista 6.x Table Style.|
|Written for||Data processor|
|Keywords||interface; customise; vista; askiavista; style; table; grumpy cat|
Documentation note : add entry for this feature in the Vista assistant
Table of contents:
- Downloading a Table Style
- Modifying the Table Style
- Uploading the new Table Style
- Additional resources
- askiavista 22.214.171.124 or higher
- basic knowledge of HTML, CSS (or LESS)
- table style management must first be enabled for the user
To do so, you must access Askiavista's Admin module. There, go to the Authorisations tab and select the Authorisation for which you wish to activate Table Style management.
There, select the AskiaVista Version 6 tab and locate the Table Style dropdown; you can set to None (no access to Table Style management), Create (allows users with this authorisation to create and use Table Styles) or Display (allows users with this authorisation to use Table Styles).
2. Downloading a Table Style
To begin creating / amending a Table Style, you must first download an existing Table Style from askiavista.
Important: you must first have an opened survey in order to download a Table Style.
To do so, click the gear icon located in the Properties panel toolbar and select Table Styles. This will display the Manage Table Styles modal.
There, select the Table Style template from which you want to base your new / custom Table Style from the dropdown menu located in the modal's toolbar (in this case, Default). Then, click the Download button and select either of:
- Download a .CSS file (styling rules will be exported as a .CSS file)
- Download a .LESS file (styling rules will be exported as a .LESS file)
For the purpose of this article, we'll be downloading the .CSS version of the Table Style. Askiavista will then prompt you to download a NameOfTheTableStyle.zip file (in this case, Default.zip). Unarchive this file and you will find the following elements:
- NameOfTheTableStyle.css: this stylesheet contains all styling rules for the selected Table Style.
- index.html: this page embeds a series of tables (flat counts, cross-tabs with and without edges, ...) so you can easily test your styling before uploading your amendments back to the askiavista server.
- selectors.html: this page details each rule contained within the .CSS file for reference.
3. Modifying the Table Style
Now, you have retrieved all necessary assets, we advise you:
Open index.html & selectors.html in your favorite browser and open NameOfTheTableStyle.css in your favorite text editor (prefer a Notepad++, TextPad or a dedicated IDE for this rather than Notepad / Wordpad).
In this example, I will only modify certain rule for the table's caption class (that is, the table header). If you compare the above original CSS file with the below amended version, you'll note I only changed some colours, text shadows, ...
Do remember to make use of index.html to test your Table Style:
Once you have achieved the Table Style you want, save your NameOfTheTableStyle.css as a new file (e.g. in this case, Green.css).
4. Uploading the new Table Style
Back on the askiavista interface, go back to the Manage Table Styles modal and click New. Assign a name to this new Table Style (in this case, MyGreenStyle):
Click Save; askiavista should display a "The 'MyGreenStyle' table style was successfully saved" notification. You can now Close the Manage Table Styles modal.
Note: depending on your browser cache settings, you may need to log out and log back into the application in order to view your new Table Style.
You can now create a new table to double check your new Table Style (just remember to select the new style in the Table Style dropdown located in the Properties panel!):
As with any table style, this new style template can be set as default template in the Survey Settings modal.
You can also Share or Delete any existing Table Style template; to do so, just return to the Manage Table Style modal, select the appropriate Table Style from the toolbar's dropdown and click either Share or Delete:
5. Additional resources