Skip to content

Commit

Permalink
predict is optional for lineplot
Browse files Browse the repository at this point in the history
  • Loading branch information
matteotolloso committed Jan 11, 2024
1 parent 4801662 commit 1135109
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions smartreport_app/kb_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ def kb_interface(params):
dataset['fill'] = False
dataset['borderColor'] = colors[i%len(colors)]
dataset['backgroundColor'] = transp_colors[i%len(colors)]
dataset['tension'] = 0
dataset['tension'] = 0.6
if predict:
dashed_dataset = {}
dashed_dataset['fill'] = False
dashed_dataset['borderColor'] = colors[i%len(colors)]
dashed_dataset['backgroundColor'] = transp_colors[i%len(colors)]
dashed_dataset['tension'] = 0.8
dashed_dataset['tension'] = 0
dashed_dataset['label'] = kb_resp['name'] + ' ' +'Prediction'
dashed_dataset['data'] = []

Expand Down
4 changes: 0 additions & 4 deletions smartreport_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ def list(self, request):
if 'chart_type' not in params:
return Response({"message": "The required parameter 'chart_type' is missing"}, status=status.HTTP_400_BAD_REQUEST)

# TODO remove after testing
if params["chart_type"] == 'line':
params['predict'] = True

if list_of_KB_uids == []:
return Response({"message": "No kpis found"}, status=status.HTTP_400_BAD_REQUEST)

Expand Down

0 comments on commit 1135109

Please sign in to comment.