weixin_33721344 2016-04-26 01:24 采纳率: 0%
浏览 26

高图:带有JSON的图

As you could pass the following values to a Highcharts graph :

{"titulos": [{"title": "Proveedor"}, {"title": "Total"}], "data": [["Dolex - 9028382372873", 88.59], ["BIOCLEAN - 2093029302930", 2.8]]}

http://www.highcharts.com/

  • 写回答

1条回答 默认 最新

  • weixin_33734785 2016-04-27 12:12
    关注

    Let's try: http://jsfiddle.net/w02p4cru/

      $('#container').highcharts({
        "titulos": [{
          "title": "Proveedor"
        }, {
          "title": "Total"
        }],
        "data": [
          ["Dolex - 9028382372873", 88.59],
          ["BIOCLEAN - 2093029302930", 2.8]
        ]
      });
    

    Turns out that you can, but I guess that is not the desired chart that you will get, since really there won't be anything. Chart's option doesn't match required options format explained in Docs nor API.

    If you change your options to match requirements, then your chart will look like in this demo: http://jsfiddle.net/w02p4cru/1/

    Code:

      $('#container').highcharts({
        "title": {
          "text": "Proveedor"
        },
        "subtitle": {
          "text": "Total"
        },
        "series": [{
          "data": [
            ["Dolex - 9028382372873", 88.59],
            ["BIOCLEAN - 2093029302930", 2.8]
          ]
        }]
      });
    

    This might not be the chart you are looking for because you have not explained what exactly do you need, but general idea is to use required options format.

    评论

报告相同问题?