template.html
success: function (result, data) {
alert(result["val"]);
check = result[0]
alert(check);
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line',
marginRight: 200,
marginBottom: 75,
marginLeft: 70,
marginTop: 80,
width: 900
},
title: {
marginTop: 100,
text: result[4]
},
xAxis: {
categories: result[1]
},
{%if result.0 == "power" %}
yAxis: {
min: 0,
max: 30
},
}
{%else %}
yAxis: {
min: 0.85,
max: 1
},
{% endif %}
views.py
list_values.append("power")
list_values.append(m)
list_values.append(p)
list_values.append(q)
list_values.append(msg)
print list_values
response.content = json.dumps(list_values, cls=DjangoJSONEncoder)
return response
i am trying to plot the y axis based on the value i am sending from views. but it always goes to the else part. i am making a ajax request. How do i access the data i am passing from views in template where im using ajax.