首页 > 有做过django项目中用到highcharts实现扇形图数据统计的吗

有做过django项目中用到highcharts实现扇形图数据统计的吗

有做过django项目中用到highcharts实现扇形图数据统计的吗


# views.py
import json
from django.http import HttpResponse
def index(request):
    data = json.dumps([your_data_here])
    return HttpResponse(content=data, content_type='application/json')

然后把返回的数据(直接就是json格式的对象),插入到highcharts的series里头。

【热门文章】
【热门文章】