Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 427 chart option to include annotations (#428)
The /sensors/<id>/chart endpoint gets three new options to include annotations. The /sensors/<id> endpoint shows asset annotations by default. Also upgrades vega, vega-lite and vega-embed, and assigns charts a responsive width by default. * Use SensorIdField Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix function call Signed-off-by: F.N. Claessen <felix@seita.nl> * Layer annotations charts on top Signed-off-by: F.N. Claessen <felix@seita.nl> * Add API endpoint to fetch chart annotations Signed-off-by: F.N. Claessen <felix@seita.nl> * Wrap long annotations Signed-off-by: F.N. Claessen <felix@seita.nl> * Stack multiple annotations for the same event Signed-off-by: F.N. Claessen <felix@seita.nl> * Fetch annotations in sensors.html Signed-off-by: F.N. Claessen <felix@seita.nl> * Allow returning annotations as DataFrame Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor into util function Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix import Signed-off-by: F.N. Claessen <felix@seita.nl> * Allow including annotations in /chart endpoint Signed-off-by: F.N. Claessen <felix@seita.nl> * black Signed-off-by: F.N. Claessen <felix@seita.nl> * black Signed-off-by: F.N. Claessen <felix@seita.nl> * Update vega dependencies Signed-off-by: F.N. Claessen <felix@seita.nl> * Do not stack annotations if there are none Signed-off-by: F.N. Claessen <felix@seita.nl> * Only add annotation chart specs if a dataset_name is given Signed-off-by: F.N. Claessen <felix@seita.nl> * Visualize annotated data with shading Signed-off-by: F.N. Claessen <felix@seita.nl> * Parameterize spacing Signed-off-by: F.N. Claessen <felix@seita.nl> * Annotation font size and style Signed-off-by: F.N. Claessen <felix@seita.nl> * Add tooltip Signed-off-by: F.N. Claessen <felix@seita.nl> * Increase tooltip font size Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix full_date transform Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: move layer definitions Signed-off-by: F.N. Claessen <felix@seita.nl> * Don't cut off tooltip annotations at 7em (which is the default vega-tooltip css) Signed-off-by: F.N. Claessen <felix@seita.nl> * Remove tooltip in favour of showing annotations only underneath the graph Signed-off-by: F.N. Claessen <felix@seita.nl> * Optional inclusion of annotations in charts, and in sensor charts include sensor annotations and asset annotations by default Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix annotation stacking Signed-off-by: F.N. Claessen <felix@seita.nl> * Include annotations that only fall partly within the queried time window Signed-off-by: F.N. Claessen <felix@seita.nl> * Changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> * Deprecate util function that is no longer used Signed-off-by: F.N. Claessen <felix@seita.nl> * Revert "Deprecate util function that is no longer used" This reverts commit 9bb9ffd. * Fix individual sensor chart UI page Signed-off-by: F.N. Claessen <felix@seita.nl> * Use auth decorator for read permissions on the sensor Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix default title font size for layered charts Signed-off-by: F.N. Claessen <felix@seita.nl> * Wrap and stack annotations also in the UI endpoint for standalone sensor charts Signed-off-by: F.N. Claessen <felix@seita.nl> * Clarify return type of sensor.chart() Signed-off-by: F.N. Claessen <felix@seita.nl> * Add missing type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * Add note from feedback on PR #428 Signed-off-by: F.N. Claessen <felix@seita.nl>
- Loading branch information
Showing
13 changed files
with
429 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.