javascript - Need some pointers regarding JSON formatting for Highcharts -
I have the following JSON that I am trying to use for a higher chart, I do not get anything in production, although I look at all the four "questions" in mythology.
[["name": "question 1", "data": ["13, 81824000, 2", "139, 81874000, 2", "13 9 1 9 9 66000, 4 "," 1391982000000, 1 "]}, {" name ":" question 2 "," data ": [" 139198180000, 3 "," 139, 81878000, 4 "", "" 3 "," data ": [" 139, 81837000, 1 "," "," "," 13, 9, 71000, 2 "," 13191982005000, 2 "]}, {" name " 13 919 1885000, 1 "," 139, 19777000, 1 "," 1391982010000, 3 "]}, {" name ":" question 4 "," data ": [" 13 9 1 9 81842000, 4 "," 139, 1989, 000, 3 "," 1391982, 82000, 3 "," 131919 82015000, 4 "]}]
/ Pre>and javascript for charts:
$ (function () {var chart; $ (document) .ready (function () {$ .getJSON ("mysql / getChartData .php? Sd = 2012 -02-09% 2015: 36: 42 and ed = 2016-02-09% 2016: 37: 39 ", Ph (Type: 'date'}, xxis: {type: 'date time'}, headline: {text: 'Text date range', X: -20}, subtitle: {text: '', x: -20} YXx: {title: {text: 'number of ratings'}}, tooltip: {formatter: function () { Return '& lt; B & gt; + This.series.name + '& lt; / B & gt; & Lt; Br / & gt; '+ This.x +': '+ this.y; }}, Legend: {layout: 'vertical', align: 'right', vertical align: 'top', X: -10, y: 100, border width: 2}, series: jason}); }); }); });
What am I doing / why will not I do this work? I have got a ton of examples of how to do it, but none of the way I need it. Tell me if something else is what I can show.
Your data should be arrayed like Tuchess, therefore: for Unix timestamps, they should be numeric, present You keep them as telegraphs It looks like you've multiplied UNIX timestamp * 1000 correctly to work in JavaScript. Be assured that the value of options.data is an array so you can add more sets to it. Try it with the first one, then gradually increase it so that you can use the higher API.
var option = {"Data": {[[139192424000, 2], [138, 81874000, 2], [13 9, 1966 000, 4] , [139198000000, 3],]}}
Comments
Post a Comment