move import
This commit is contained in:
parent
904eb3538c
commit
946de18bea
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue