I am using Django-Chartit to create a chart.
Trying to follow this example.
my problem is that i want to use data not from a model
so i tried this code
data = \
DataPool(
series=
[{'options': {
'source': [1,2,3,4,5,6,7,8,9,10]},
'terms': [
'month',
'houston_temp',
'boston_temp']}
])
chart = Chart(
datasource = data,
series_options =
[{'options':{
'type': 'line',
'stacking': False},
'terms':{
'month': [
'boston_temp',
'houston_temp']
}}],
chart_options =
{'title': {'text': 'Weather Data of Boston and Houston'},
'xAxis': {'title': {'text': 'Month number'}
}})
and i got an error message
'source' must either be a QuerySet, Model or Manager. Got [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] of type instead.
I dont think i can create a QuerySet from a list. Any idea ?