Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a dashboard component, which has space for two basic widgets:
Used
ChartJS
(in itsreact
implementation) in order to plot the charts. The reasoning is that it is one of the most widely used plotting modules (much more widely used than the tanstack equivalent), and that it implements pie charts and other fun plotting methods. The "fun" is necessary in order to break up the visual monotony of a dashboard that only consists of x/y data (as discussed with @bari12, @mlassnig, etc). ChartJS is also preferable to D3 since it is easier to learn and the required complexity and interactivity of the dashboard components is not high enough as to warrant using a more complex library.The "Locks of ongoing rules" chart uses tanstack table in the back (with some added generic typing and helper functions) to enable interactivity in sorting and filtering the data. Chart data is first piped into a tanstack table and UI elements for sorting and filtering can connect to this table, among other possible manipulations. The table data is then reformatted and passed to the charting module.
Components taken from
StreamedTable
were used to implement the UI elements. Note that when designing new widgets, it makes sense to useChartJS
for very specific elements, such as the actual chart, and implement the widget layout and interactive elements by yourself.The component does not fully implement dark mode yet. It is fully responsive. Note that due to a peculiarity of
ChartJS
, a chart will not grow after having shrunk from a resizing. In practice, this should not be an issue, since users will have fixed window sizes most of the time.