Admiro Dashboard Theme For Appgini
  • Introduction
  • Installation Guide
  • General Settings
  • Table Menu Settings
  • Dashboard Builder
  • Custom Page Builder
  • Reports Builder
  • Translation Tool For Admiro
  • File Manager
  • Widget Functions
    • Data Card
  • Sweet Alert
  • Alert
  • Welcome Banner
  • Statistics Counter Card
  • Basic Table
  • Data Table
  • Modal
  • Full Calendar
  • Drop Zone
  • Line Chart
  • Area Chart
  • Bar Chart
  • Column Chart
  • Pie Chart
  • Donut Chart
  • Timeline Chart
  • Options
Powered by GitBook
On this page
  • Structure
  • Parameters
  • Example Usage
  • Output

Donut Chart

PreviousPie ChartNextTimeline Chart

Last updated 7 months ago

This widget function displays a donut chart whenever you call it.

Structure

showDonutChart($chartTitle = "Title Of The Pie Chart", $chartData, $chartSize = "col-md-12")

Parameters

The function accepts 3 parameters that are illustrated below

  • Chart Title- This is the title of the chart

  • Chart Data- sql query, the query needs to have 2 fields to be used that is: label and value

  • Chart Size= This is a bootstrap class for chart size, default is col-md-12

Example Usage

echo showDonutChart("Orders Per Year", sql("SELECT COUNT(*) AS value,YEAR(OrderDate) AS label FROM orders GROUP BY YEAR(OrderDate) ORDER BY YEAR(OrderDate) DESC", $eo), "col-md-6");

In the above chart I have passed in chart title, my sql query and size class

Output

Donut Chart Output