Display data in a bar chart

Chong-ho (Alex) Yu, Ph.D., MCSE, CNE, CCNA

Problem: I want to display scores in a bar chart as shown in the following. The bar chart must be updated according to the data values in the database dynamically.

Test Number
Score Level




Test 1

Test 2

Test 3

Test 4

Test 5

You can use external modules such as graphical plug-ins from Wave in Motions. If you don't have any graphical plug-in, the easiest way to display data in a bar chart or a histogram is to specify the width of the GIF file (bars) using the data value:
  • In PhotoShop or any graphing program, create a 20X20 (pixel) GIF file, fill it with your desired color.
  • In the record_detail page, in which the data are shown, create a table and place the GIF file in the proper row.
  • In each image tag for the GIF file, substitute the width of each GIF file with the FMP field value, as shown in the following:

                 <IMG SRC="ybar.gif" WIDTH="[FMP-FIELD: test_score1]" HEIGHT=20  BORDER=1 ALIGN=bottom>




FMP Tips Contents

Other computer tips

Search Engine

Credit/Copyright ©

Simplified Navigation

Table of Contents

Contact Me