basic-report 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {basic_report-0.2.0 → basic_report-0.2.1}/PKG-INFO +1 -1
- {basic_report-0.2.0 → basic_report-0.2.1}/pyproject.toml +1 -1
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/configs/default.yaml +1 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/heatmap.py +14 -7
- {basic_report-0.2.0 → basic_report-0.2.1}/LICENSE.md +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/README.md +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/__init__.py +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/bootstrap/bootstrap.min.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/bootstrap/bootstrap.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/bootstrap/jquery-3.3.1.slim.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/bootstrap/popper.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/datatables/dataTables.bootstrap4.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/datatables/jquery.dataTables.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/CalendarLabel.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/Legend.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/Tooltip.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/cal-heatmap.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/cal-heatmap.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/d3.v7.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/popper.min.js +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/page.py +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/report.py +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/base.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/accordion.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/colors.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/heatmap.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/navbar.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/site.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/table.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/css/tabs.css +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/accordion.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/columns.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/global_links.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/header.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/image.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/list.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/navbar_left.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/navbar_right.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/navbar_top.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/report_ball_section.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/report_header.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/sublevel.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/table.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/tabs.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/text.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/base.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/button_next.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/button_prev.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/heatmap.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/legend.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/script.html +0 -0
- {basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/utils.py +0 -0
|
@@ -193,7 +193,7 @@ class CalendarDate:
|
|
|
193
193
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
194
194
|
ColorSchemeLiteral = Literal['YlOrRd', 'Blues', 'Greens', 'Greys', 'Oranges', 'Reds', 'Purples', 'Turbo', 'Viridis',
|
|
195
195
|
'Inferno', 'Magma', 'Plasma', 'Cividis', 'Warm', 'Cool', 'Cubehelix', 'BuPu', 'GnBu',
|
|
196
|
-
'OrRd', 'PuBuGn', 'PuBu' 'PuRd', 'RdPu', 'YlGnBu', 'YlGn', 'YlOrBr', 'YlOrRd',
|
|
196
|
+
'OrRd', 'PuBuGn', 'PuBu', 'PuRd', 'RdPu', 'YlGnBu', 'YlGn', 'YlOrBr', 'YlOrRd',
|
|
197
197
|
'BrBG', 'PRGn', 'PiYG', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'Spectral',
|
|
198
198
|
'Rainbow', 'Sinebow', None]
|
|
199
199
|
ColorInterpolateLiteral = Literal['rgb', 'hsl', 'lab', 'hcl', None]
|
|
@@ -243,7 +243,8 @@ class CalendarMisc:
|
|
|
243
243
|
animation_duration: int = 200
|
|
244
244
|
vertical_orientation: bool = False
|
|
245
245
|
tooltip_enabled: bool = True
|
|
246
|
-
tooltip_function: str = "
|
|
246
|
+
tooltip_function: str = "predefined:date+value"
|
|
247
|
+
tooltip_precision: int | None = None
|
|
247
248
|
legend_width: int = 300
|
|
248
249
|
legend_label: str | None = None
|
|
249
250
|
legend_font_size: int = 14
|
|
@@ -258,21 +259,27 @@ class CalendarMisc:
|
|
|
258
259
|
raise ValueError(msg)
|
|
259
260
|
|
|
260
261
|
if self.tooltip_function.startswith('predefined:'):
|
|
262
|
+
|
|
263
|
+
if self.tooltip_precision is not None:
|
|
264
|
+
value = f'${{(value ?? 0).toFixed({self.tooltip_precision})}}'
|
|
265
|
+
else:
|
|
266
|
+
value = '${value ?? 0}'
|
|
267
|
+
|
|
261
268
|
options = self.tooltip_function.removeprefix('predefined:')
|
|
262
|
-
|
|
263
269
|
defined_options = ['value', 'date+value', 'datetime+value']
|
|
264
270
|
if options == 'value':
|
|
265
|
-
tfn =
|
|
271
|
+
tfn = value
|
|
266
272
|
elif options == 'date+value':
|
|
267
|
-
tfn = "${dayjsDate.format('YYYY-MM-DD')} :
|
|
273
|
+
tfn = f"${{dayjsDate.format('YYYY-MM-DD')}} : {value}"
|
|
268
274
|
elif options == 'datetime+value':
|
|
269
|
-
tfn = "${dayjsDate.format('YYYY-MM-DD HH:mm:ss')} :
|
|
275
|
+
tfn = f"${{dayjsDate.format('YYYY-MM-DD HH:mm:ss')}} : {value}"
|
|
270
276
|
else:
|
|
271
277
|
msg = f'Unknown predefined tooltip function {self.tooltip_function}. Use one of `predefined:{defined_options}`'
|
|
272
278
|
logger.error(msg)
|
|
273
279
|
raise RuntimeError(msg)
|
|
274
280
|
|
|
275
|
-
self.tooltip_function = 'function (timestamp, value, dayjsDate) {return `
|
|
281
|
+
self.tooltip_function = f'function (timestamp, value, dayjsDate) {{return `{tfn}`;}}'
|
|
282
|
+
|
|
276
283
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
277
284
|
# region DATA
|
|
278
285
|
#-----------------------------------------------------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/bootstrap/popper.min.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/Legend.min.js
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/Tooltip.min.js
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/cal-heatmap.css
RENAMED
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/d3.v7.min.js
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/css_and_scripts/heatmap/popper.min.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/accordion.html
RENAMED
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/global_links.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/navbar_left.html
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/navbar_right.html
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/navbar_top.html
RENAMED
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/elements/report_header.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/button_next.html
RENAMED
|
File without changes
|
{basic_report-0.2.0 → basic_report-0.2.1}/src/basic_report/templates/heatmap/button_prev.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|