sorted data to display

parent 6ddcc845
......@@ -18,7 +18,7 @@ from GeoInt_SIDT import settings
def report_L2ASCL(request, report):
with open("/home/ulises/REPSAT_NAS/mario_repsat_test/"+report+".json") as f:
with open("/home/emmanuelhp/NAS/mario_repsat_test/"+report+".json") as f:
json_data = OrderedDict(json.load(f))
graphData = dict()
graphData['type'] = "line"
......@@ -46,6 +46,8 @@ def report_L2ASCL(request, report):
item['backgroundColor'] = colors[int(l)]
data['datasets'].append(item)
data['datasets'].sort(key=lambda k: max(k['data']))
graphData['data'] = data
#print(settings.BASE_URL)
# graphData['options']['responsive']=True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment