Database Error - warwickfoster/qurantools GitHub Wiki
app/charts/chart_roots.php
File:Purpose
The provided HTML code snippet is a PHP script that generates a web page for displaying a chart of root occurrences in the Quran.
Features
- Chart Type Bar chart using the FusionCharts JavaScript library.
- Data Source MySQL database.
- Chart Controls
- Provenance filter (Meccan, Medinan, All Suras)
- Occurrence filter (All Occurrences, Occurrences per 100 Words)
- Sort by option (Sura Number, Occurrences)
- User Interface
- Title: Root Occurrences
- Subtitle: Arabic root (transliterated)
- Chart container
- Chart controls
- Footer with links to other pages
Functionality
- Database Query The script retrieves data from the MySQL database based on the selected filters (provenance, occurrence, and sort order).
- Data Transformation The retrieved data is transformed into a JSON object in the format required by the FusionCharts JavaScript library.
- Chart Creation The FusionCharts JavaScript library is used to create a bar chart with the transformed data.
- Chart Controls The user can interact with the chart controls to filter the data and change the sort order.
- User Interface The script generates the HTML and JavaScript code for the page, including the title, subtitle, chart container, chart controls, and footer.
Additional Notes
- The
transliterate_new()
function is used to transliterate the Arabic root into English. - The
$user_preference_transliteration_style
variable is used to set the font style for the transliteration. - The
provenance_footer.php
file is included if the provenance filter is set to "ANY".
Overall, the script provides a user-friendly interface for visualizing root occurrences in the Quran.