Changing the Color of the Border of Charts

How to:

To change the color of the border of the charts that are displayed on an active dashboard, you must change a value in a server-side JavaScript file. The change is applied to all active dashboards when they are run.

The default color of the border of charts is black.

The following image shows a sample dashboard that is titled Century Electronics Sales Dashboard. The border of the pie, line, and bar charts is black.

Century Electronics Sales Dashboard


Top of page

x
Procedure: How to Change the Color of the Border of Charts

This procedure describes how to change the color of the border of three charts on a sample active dashboard, from black (the default) to crimson.

  1. Navigate to the irptbl.js file, which is located in the \home\etc directory on the WebFOCUS Reporting Server.
  2. Open the irptbl.js file in Notepad or another text editor.
  3. Locate the following line of JavaScript code. One way to locate the line is to search for the first instance of the value #000000 in the file. The value #000000 represents the color black.
    if(mytable.a_cntl.reportView!=REPORTPIVOT)
         dobj.style.border=mytable.n_border+'px solid #000000';
  4. Determine the hexadecimal value of the color that you want to apply to the border.

    There are many Web sites that give the hexadecimal values of colors. Search for the string hexadecimal color using your preferred search engine.

    For example, the following link displays a sample Web page with colors and their hexadecimal values.

    http://www.pagetutor.com/common/bgcolors1536.png
  5. Supply the hexadecimal value in the JavaScript code, replacing the value #000000. Save the irptbl.js file.

    The following sample code shows a new value of #990022, which represents the color crimson.

    if(mytable.a_cntl.reportView!=REPORTPIVOT)
         dobj.style.border=mytable.n_border+'px solid #990022';
  6. Run the active dashboard.

    The sample Century Electronics Sales Dashboard displays the new color for the border of the pie, line, and bar charts, as shown in the following image.

    Customized color of border of charts


WebFOCUS