1

我一直在寻找如何将数据从 json 加载到条形图,但我无法让它工作。

我有一个如下所示的 JSON 文件(其中的一部分):

[{
    "id":1,
    "geslacht":"Vrouw",
    "totaal punten":60,
    "project 1":9,
    "ucd":6,
    "internetstandaarden":7,
    "understanding design":7,
    "Teamproject deel 1":6,
    "Taal in context":6,
    "Vormgeving":7,
    "Marketing":6,
    "Students in Motion":7,
    "Teamproject deel 2":7,
    "H&C":6,
    "Programmeren":7,
    "M&I":7,
    "Project 3":6,
    "Mediageschiedenis":6,
    "Business Mapping":7,
    "Plug & Play":7,
    "SLC":7,
    "Studieregie":8,
},{
    "id":2,
    "geslacht":"Man",
    "totaal punten":43,
    "project 1":8,
    "ucd":6,
    "internetstandaarden":0,
    "understanding design":7,
    "Teamproject deel 1":6,
    "Taal in context":0,
    "Vormgeving":7,
    "Marketing":7,
    "Students in Motion":7,
    "Teamproject deel 2":7,
    "H&C":6,
    "Programmeren":7,
    "M&I":0,
    "Project 3":6,
    "Mediageschiedenis":0,
    "Business Mapping":7,
    "Plug & Play":7,
    "SLC":8,
    "Studieregie":6,
}]

我怎样才能创建一个条形图?

4

1 回答 1

0

我建议使用诸如Highcharts之类的图表库。它使用起来非常简单,并提供了多种不同的图表类型。不过,您可能需要稍微不同地格式化 JSON 文件(我认为 - 乍一看)

于 2012-11-26T16:10:07.703 回答