# Create your views here.
from django.shortcuts import render
def pie_chart(request):
labels = ["A", "B", "C"]
data = ["10", "15", "2"]
return render(request, 'pie_chart.html', {
'labels': labels,
'data': data,
})
Now what if we have another pair of lists as follows:
labels1 = ["X", "Y", "Z"]
data1 = ["10", "15", "2"]
So can anyone say what changes should I made in the above code to display 2 pie charts displaying labels/data and labels1/data1 ?
Thanks in advance.