.. _dashboard widgets: =================== Dashboard widgets =================== Base & mixin classes ======================= All widgets should extend :class:`BaseDashboardWidget `. In addition :class:`StandaloneDashboardWidgetMixin ` should be used with some exceptions of hardcoded-only widgets. .. rubric:: Notable mixins: :class:`StandaloneDashboardWidgetMixin ` Makes widget "Standalone" (widget can calculate its own data) by standardizing its constructor arguments and providing common methods and properties for filtering and working with :term:`audit forms`, :term:`QIP issues `, :term:`observations `, etc. .. note:: All new widgets must include this mixin unless already included by its subclass :class:`ConfigSchemaWidgetMixin ` Allows widget to define its own configuration schema using `django-jsonform `_ library to present configuration options to the user in a form style rather than ras :term:`json`. .. tip:: Add this mixin to make it more user-friendly and enable it to be edited by end users in the new :task:`edit pop-up <23082>` :class:`WidgetPermissionsMixin ` Allows implementing widgets to specify :term:`permissions ` required to use the widget. If user does not have the required permissions, the widget will not display. :class:`ActionMenuMixin ` Adds menu options to the widget. This is included by default in :class:`BaseDashboardWidget `. :class:`TimeGranularityWidgetMixin ` For time-scale / over-time widgets, allows user to specify time granularity (defined in :const:`SUPPORTED_GRANULARITIES`) and exposes ``granularity`` property to the widget. Base classes ------------------ .. automodule:: dashboard_widgets.widgets.base :members: Widget mix-ins ---------------- .. automodule:: dashboard_widgets.widgets.mixin :members: .. automodule:: dashboard_widgets.widgets.mixins :members: Chart Widgets ============== All widgets rendering some sort of a graph or chart, primarily using ChartJS library. These widgets all inherit from :class:`dashboard_widgets.widgets.chart.BaseChartWidget`. .. automodule:: dashboard_widgets.widgets.chart :members: .. automodule:: dashboard_widgets.widgets.pie_chart :members: .. automodule:: dashboard_widgets.widgets.bar_chart :members: .. automodule:: dashboard_widgets.widgets.line_chart :members: .. automodule:: dashboard_widgets.widgets.pareto_chart :members: .. automodule:: dashboard_widgets.widgets.takeda :members: .. automodule:: dashboard_widgets.widgets.benchmark :members: Table Widgets ============= .. automodule:: dashboard_widgets.widgets.table :members: .. automodule:: dashboard_widgets.widgets.ward_compliance :members: .. automodule:: dashboard_widgets.widgets.question_compliance_table :members: .. automodule:: dashboard_widgets.widgets.kpi :members: .. automodule:: dashboard_widgets.widgets.accreditation :members: .. automodule:: dashboard_widgets.widgets.audit_scores :members: Heatmap widgets ================ .. automodule:: dashboard_widgets.widgets.heatmap :members: .. automodule:: dashboard_widgets.widgets.ward_heatmap :members: Summary widgets ================ .. automodule:: dashboard_widgets.widgets.report_summary :members: QIP widgets ============ .. automodule:: dashboard_widgets.widgets.qip_stackedbar_chart :members: