api/anomaly/services/plotChart.py
Function anomalyChartToImgStr
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def anomalyChartToImgStr(anomalyId: int = 0):
""" Generate anomaly chart and convert it to image """
anomaly = Anomaly.objects.get(id=anomalyId)
granularity = anomaly.anomalyDefinition.dataset.granularity
data = anomaly.data