Customer Statistics - warwickfoster/qurantools GitHub Wiki

File: app/charts/chart_rhyme_homogeneity.php

Purpose

The provided code is a PHP script that generates a FusionCharts chart that visualizes the rhyme/verse ending homogeneity per sura in the Quran.

Key Features

  • Sorts suras based on rhyme/verse ending homogeneity percentage (descending).
  • Displays data in a column chart.
  • Shows the number of distinct rhyme patterns and the percentage of verses with unique rhyme patterns.
  • Allows users to view details of individual suras by clicking on the chart bars.

How it Works

  1. Database Query

    • Queries the SURA-DATA table to retrieve data for each sura, including the number of verses, distinct rhyme patterns, and rhyme/verse ending homogeneity percentage.
  2. FusionCharts Data Source

    • Creates a JSON data source for FusionCharts, containing information about the chart, data points, labels, and links.
  3. Chart Initialization

    • Initializes a FusionCharts object with the JSON data source and settings.
    • Renders the chart within the chartContainer element.

Usage

  • The script is self-contained and can be run directly.
  • It can be embedded within an HTML page.

Benefits

  • Visually represents the rhyme/verse ending homogeneity of the Quran.
  • Provides insights into the diversity and uniformity of rhyme patterns across different suras.
  • Facilitates understanding of the Quranic language and its poetic structure.

Additional Notes

  • The code includes a header and footer, as well as navigation elements.
  • The provenance_footer.php file may contain additional information about the data source.
  • The print_control.php file provides a print option.