Dashboard
A list of Quill Reports grouped into Metrics, Charts, and Tables.
import { QuillProvider, Dashboard } from "@quillsql/react";
function App() {
return (
<QuillProvider organizationId="2" publicKey="6579031b3e41c378aa8180ec">
<Dashboard name="Transactions" />
</QuillProvider>
);
}
Dynamically displays a filterable grid of charts, metrics, and tables with live data from your database. Once implemented, Quill lets you perform zero-downtime, zero-code updates to your dashboard on an org-level as well as company-wide.
QuillProvider
is a parent of the Dashboard
component.Don’t have a dashboard name yet? Learn how to create a dashboard in the Quill portal to get started.
Examples
import { Dashboard } from "@quillsql/react";
import { AntDateRangePickerComponent } from "./ui/ant/DateRangePickerComponent";
import { AntTableComponent } from "./ui/ant/TableComponent";
import { AntSelectComponent } from "./ui/ant/SelectComponent";
import { AntChartComponent } from "./ui/ant/ChartComponent";
import { AntMetricComponent } from "./ui/ant/MetricComponent";
export function AntDashboard() {
return (
<Dashboard
name="Transactions"
containerStyle={dashboardStyles}
DateRangePickerComponent={AntDateRangePickerComponent}
SelectComponent={AntSelectComponent}
TableComponent={AntTableComponent}
MetricComponent={AntMetricComponent}
ChartComponent={AntChartComponent}
FilterContainerComponent={AntFilterContainerComponent}
/>
);
}
Props
The name of the dashboard you created in the Quill Portal.
A component that wraps a report for ‘metric’ chart types.
A component that wraps a report for non-metric, non-table chart types.
A component that wraps a report for ‘table’ chart types.
A select component.
A date range picker component.
A component that wraps each dashboard section.
Each dashboard is grouped into three sections: metrics, charts, and tables (in that order). Some sections may be empty, in which case they are omitted.
A component that wraps all dashboard sections.
A component that wraps the row of dashboard filters.
A fallback component displayed when an active dashboard has no reports.
Callback function that fires when a report is clicked. A common use case is navigating to a new page based on the report’s id. A dashboard is composed of a list of reports that could be metrics, charts, or tables.
QuillReport
here.A callback that is fired when the loading status of the dashboard changes.
Whether to hide dashboard filters.
Whether the date range filters on the dashboard are hidden.
Whether to hide the xAxis for all charts on this dashboard.
Whether to hide the yAxis for all charts on this dashboard.
Whether to hide the cartesian grid for all charts on this dashboard.
The line style for comparison ranges on all line charts on this dashboard.
Applies the following classes to the ReportBuilder.
This container is the parent of all the filtering buttons as well as any dashboard sections. This can be useful for TailwindCSS-style classname strings.
The CSS styles that wrap the dashboard container.
This container is the parent of all the filtering buttons as well as any dashboard sections.
The styles for the chart container.
QuillReport
The report’s unique id.
The name of the report.
The name of the dashboard this report belongs to.
The rows of data returned from this report’s query.
The columns data returned from this report’s query.
The type of this chart.
The table and field this chart uses for date filtering.
The pivot used in this query, if any.
The formatted primary range aggregation value, if any.
The formatted comparison range aggregation value, if any.
The percent change in the aggragations, if any.
The label of the xAxis.
The field to use for the report’s xAxis.
The format for the report’s xAxis.
A list of metadata bout the yAxes of this report.
The relative ordering of this report in relation to its siblings. Ordering starts at 1 and counts up.
Reports in the same section are first grouped by chartType
and then
each group is sorted by order
.
Currently, the first group is metric
and the last group is table
with
the rest of the reports in between.
The rows of data returned from this report’s query over the comparison date range as opposed to the primary date range.
A map of filters that have been applied to this query.