Color Coding via m-Painter
To help highlight data patterns, developers often employ the use of conditional styles to color code their data. For example, when a percentage is greater than 80%, you may wish to make that data cell green, whereas otherwise you would want to continue to leave it as a white background with black text.
Color Coding Demonstration
m-Painter allows you to add color coding to your data set in the following methods:
Color Coding the Cell/Row
To begin, right click the cell you wish to color code, then place your cursor over the "Cell" context option, and select "Color Code Cell".
You will be brought to a screen that looks like this:
Utilize the condition area to specify the rules for your condition. In the "Value Field/Text" input box you can either specify a hard-coded value (via the "Text" option) or compare two fields to one another (via the "Field Value" option). By clicking the "Add Another Case" button, you can add additional conditions to this rule.
The next step, is to specify either a CSS Class or a CSS Style. If you have a pre-made CSS class you wish to use, please enter it in the "CSS Class Name." If not, toggle to the "Set CSS Styles" tab and enter in the rules you wish your condition to use.
When finished, be sure to click "Save Condition" button. If you wish to have multiple color condition rules on one cell, feel free to add additional conditions within this same wizard. When completed, be sure to press OK to close the wizard.
In the below example, I have created 3 rules depending on the value of my "Runs" field value.
In m-Painter, I can see this individual cell has color coding on it, as a thicker border is now drawn.
Note: This border is only visible in m-Painter and will not be seen by the end-user.
At run-time my application looks something like this:
Note: While not explicitly stated above, the same process could be employed by row so that your conditional logic is applied to all cells within a row by right clicking on a cell, hovering over Row, then choosing the "Color Code Row" option.
Color Coding the Entire Column with a Report
Report templates are unique in that they display multiple levels of output depending on selected subtotal and grand total levels. If you were interested in creating a conditional rule that applied to all rows for a given column, first right click one of the cells within the column you wish to color code, then place your cursor over the "Column" context option, and select "Color Code Column".
You'll notice that you now have the ability to select the "From" location of your selected field. The purpose of this option is to allow you "from" where you would like the data accessed for your conditional logic. Specifically, since you are working across multiple levels, be sure to select either "Subtotal" or "Last Row of Detail", depending on how you want your totaling levels to be computed — when the color conditioning is processed for the detail level, it will automatically utilize the data from the row level.
As an example, see how I have configured my column to print a yellow background when the value from field "Issues- this period" is greater than the value from field "Receipts- this period". Be sure to press "Save Condition" prior to pressing "Ok."
In my output below, you can see how my color logic was applied to all levels.
Color Coding with the OLAP Pivot Table Report Template
The OLAP Pivot Table template supports color coding as of the January 2015 release of m-Power.
Click the Color Code icon in the Insert tool menu to add a new color condition.
m-Painter will display a list of saved conditions at the bottom of the page. To edit a saved condition, place your cursor over the desired condition and right-click. Select Insert/Edit Color Condition.
Note: Color coding dimension fields is not supported in the OLAP Pivot Table template. You may only set conditional coloring for value fields.
Other Important Details….
Created: July 7, 2014 | Modified: November 7, 2017
Browse By CategoryStarting with m-Power (8)
Build Process (13)
m-Power Data Explorer (4)
m-Power Administration (23)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)