Customizing Poll Results

Example

Displaying custom election poll results.

MGI Tags

  • mgiPoll

Steps

  1. Open the poll results page in a text editor.
  2. Insert the custom results parameters in the mgiPoll tag.
  3. Save the poll results page.
  4. FTP the poll results page to the web server running MGI.
  5. View the poll results page.


Step 1: Open the poll results page in a text editor.

Open the poll results page in a text editing program that allows you to view and modify HTML.

Step 2: Insert the custom results parameters in the mgiPoll tag.

The numeric representation and graphic display of poll results can be customized by inserting specific parameters in the mgiPoll tag that is used to display results. Note: A second mgiPoll tag may be located on the mgiPoll results page. That tag is used for adding poll results to the poll database. When inserting custom results parameters, use the mgiPoll tag that already contains the "tally" parameter.
 
Insert the "tallyResultsBy" parameter to customize the numeric display of the poll result for each answer. Enter "Total" to display the poll results for each answer as a whole number that represents the total number of votes for that answer. Enter "PercentageOfTotal" to display the poll results for each answer as a percentage of the total votes submitted for the question.
 
Insert the "colorCycle" parameter to customize the bar color of each poll result. By default, the bars cycle through the following colors blue, green, orange, red, violet and yellow. Enter a comma-delimited list of any default colors to customize the color cycle (e.g., "blue,red"). Only default colors may be used in the color cycle, although you may choose any number of default colors and their order.
 
Insert the maximumBarGraphLength parameter and barGraphHeight parameter to customize the size of the bar graph for each result. Enter the maximum bar length and bar height in pixels.
<mgiPoll databasefilelocation="Surveys"
tableName="Election2000" formatFileLocation="pollformat.txt" 
tally="yes" tallyresultsby="total" colorcycle="blue,red"
maximumBarGraphLength="300" barGraphHeight="13">

Step 3: Save the poll results page.

Save the changes you have made to the poll results page.

Step 5: FTP the poll results page to the web server running MGI.

Upload the poll results page to the web server using an FTP program.

Step 6: View the poll results page.

View the poll results page with a web browser. The poll results display as total numbers, alternate between blue and red bars and appear a maximum of 300 pixels wide (relative to the number of votes) and 13 pixels high.


[Return to the Administering Polls and Surveys Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]