Skip to content

Commit

Permalink
move import
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 27, 2023
1 parent 904eb35 commit 946de18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/tacticalrmm/ee/reporting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 946de18

Please sign in to comment.