From 946de18bea8039c34bdb5f150abf62dd89d560d8 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 27 Oct 2023 06:33:10 +0000 Subject: [PATCH] move import --- api/tacticalrmm/ee/reporting/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/ee/reporting/utils.py b/api/tacticalrmm/ee/reporting/utils.py index d332daf2..81343f53 100644 --- a/api/tacticalrmm/ee/reporting/utils.py +++ b/api/tacticalrmm/ee/reporting/utils.py @@ -9,7 +9,6 @@ import re from enum import Enum from typing import Any, Dict, List, Literal, Optional, Tuple, Type, Union, cast -import plotly.express as px import yaml from django.apps import apps from jinja2 import Environment, FunctionLoader @@ -596,6 +595,9 @@ def generate_chart( traces: Optional[Dict[str, Any]] = None, layout: Optional[Dict[str, Any]] = None, ) -> str: + ### TODO figure out why plotly affects perf + import plotly.express as px + fig = getattr(px, type)(**options) if traces: