Merge pull request #52 from mistercrunch/master_job

Adding stacked and percent area charts
This commit is contained in:
Maxime Beauchemin 2014-12-08 10:21:02 -08:00
Родитель 37fd117720 fcd8c1e7f5
Коммит ed807ca8d1
1 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -209,16 +209,26 @@ class Airflow(BaseView):
for series in sorted(
all_data, key=lambda s: all_data[s][0][1], reverse=True)
]
chart_type = chart.chart_type
if chart.chart_type == "stacked_area":
stacking = "normal"
chart_type = 'area'
elif chart.chart_type == "percent_area":
stacking = "percent"
chart_type = 'area'
else:
stacking = None
hc = {
'chart':{
'type': chart.chart_type
'type': chart_type
},
'plotOptions': {
'series': {
'marker': {
'enabled': False
}
}
},
'area': {'stacking': stacking},
},
'title': {'text': ''},
'xAxis': {
@ -767,7 +777,9 @@ class ChartModelView(ModelView):
('spline', 'Spline Chart'),
('bar', 'Bar Chart'),
('column', 'Column Chart'),
('area', 'Area Chart'),
('area', 'Overlapping Area Chart'),
('stacked_area', 'Stacked Area Chart'),
('percent_area', 'Percent Area Chart'),
]
}
mv = ChartModelView(