Whenever you set about creating a new Diveport or even just a new environment in an existing Diveport, you should take a few moments to set up some macros relating to the colours and fonts you are going to use.
This brief but important job will same you lots of time in the long run – especially if you ever want to make changes to colours and fonts across just one environment, in which case your normal fallback of making a global substitute of the colour values in the portaldb.json (Diveport 7) or portaldb.xml file will not work easily, as you will overwrite the colours in all the environments at once.
Naming Conventions are Helpful
Set up unique macros for each colour and font size/type you are going to use – and add more as needed. In my examples below I have used a naming convention for defining the four user defined colours I am going to use. Although you might think you should give yourself a visual clue like the colour name – red, blue, green etc, this will be confusing if you ever want to change the macro to a different colour value. Enter the RGB codes for each colour value.
So I just stick to the code and number format. You could use a different code if you use a different set of colours for each environment, or a code that relates to the department or area of the business that is using these colours uniquely.
Adding Portlets Using Macro Values
Select the portlet you are going to use e.g. a Background Portlet, and create a background rectangle using the formula for the macro colour you want. (It’s a good idea to keep a Textpad file open with all the macros you have set up listed there so you can just copy and paste them into the fields in Diveport). Another tip is to create the size of background you want on one page,with any headers etc placed in position – e.g. a different coloured rectangle to serve as a background for quickviews, and then copy this first page to create as many new pages as you might need – before adding any more portlets. This way your pages will all be uniform and look better when navigating form page to page.
Using Font Macros with Colour Macros
Using the same method you can mix the text font macros with colour macros.
Extending to Other Macros
The same technique can be used throughout the Diveport – for instance you might want to set up macros for corner radius of a rectangle, or hover colours etc etc.
Other Formatting Tips
Did you know that using a Text indicator within a Measures Portlet, you can display numerical and textual data using data thresholds and colours to communicate performance – instead of using graphical indicators like traffic lights or arrows?
Customising with Organisation for Easier Maintenance
Remember, whenever you set up Diveport or new Diveport Environments, just take a few minutes to plan your method and organise how you will tackle each one. If your environments are likely to have different colours and fonts, give them a unique naming convention – then when it comes to changing colours or fonts all you have to do is change the colour values on the existing macros Macros or add new Macros and replace using text pad global replace on the .json file – which will work just for that environment. I wish I had realised this when I first started creating Diveports – it would have saved me so much time!!
Good luck!
About Debbie Lonsdale
Debbie Lonsdale has been working with the Diver Solution as a BI Consultant at Dynamic Business Informatics since 2008. Her previous experience includes computer programming, analytical and technical roles, team management, account management, sales and marketing in a variety of market sectors, including the Travel Industry and Distribution. She combines this experience as an all round ICT professional in the BI sector.