Skip to content

Commit

Permalink
scatter plot
Browse files Browse the repository at this point in the history
  • Loading branch information
matteotolloso committed Nov 12, 2023
1 parent 1d9d492 commit 9b50209
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions smartreport_app/kb_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ def kb_interface(kpi_name, params):
}]
}

return response

elif plot_type == 'bar':
response = {
'labels': ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
Expand Down Expand Up @@ -45,7 +43,6 @@ def kb_interface(kpi_name, params):
'borderWidth': 1
}]
}
return response

elif plot_type == 'scatter':
response = {
Expand All @@ -61,8 +58,6 @@ def kb_interface(kpi_name, params):
'backgroundColor': 'rgb(255, 99, 132)'
}],
}

return response

elif plot_type == 'pie' or plot_type == 'doughnut':
response = {
Expand All @@ -78,8 +73,6 @@ def kb_interface(kpi_name, params):
}]
}

return response

elif plot_type == 'radar':
response = {
'labels': [
Expand Down Expand Up @@ -114,4 +107,15 @@ def kb_interface(kpi_name, params):
}]
}

return response
elif plot_type == 'scatter':
response = {
'datasets': [{
'label': 'Scatter Dataset',
'data': [{'x': -10,'y': 0}, {'x': 0,'y': 10 }, {'x': 10,'y': 5},{'x': 0.5, 'y': 5.5
}],
'backgroundColor': 'rgb(255, 99, 132)'
}],
}


return response

0 comments on commit 9b50209

Please sign in to comment.