mysql - AmStockChart by json did not display -
mysql - AmStockChart by json did not display -
i want utilize amchart , getting info charts mysql json. display not things.
this js source:
<script type="text/javascript"> var chart2; $(document).ready(function(){ $.getjson("data", function (data) { chart2.dataprovider = data; chart2.datadateformat = "yyyy-dd-mm"; chart2.validatedata(); }); }); var chart2 = amcharts.makechart("chartdiv2", { type: "stock", theme: "none", pathtoimages: "http://www.amcharts.com/lib/3/images/", datasets: [{ title: "participants", fieldmappings: [{ fromfield: "student", tofield: "student" }], categoryfield: "date" } ], datadateformat: "yyyy-mm-dd", panels: [{ showcategoryaxis: false, title: "student", percentheight: 70, stockgraphs: [{ id: "g1", valuefield: "student", comparable: true, comparefield: "student", balloontext: "[[title]]:<b>[[student]]</b>", comparegraphballoontext: "[[title]]:<b>[[student]]</b>" }], stocklegend: { periodvaluetextcomparing: "[[percents.student.close]]%", periodvaluetextregular: "[[value.close]]" } }], chartscrollbarsettings: { graph: "g1" }, chartcursorsettings: { valueballoonsenabled: true, fullwidth: true, cursoralpha: 0.1, valuelineballoonenabled: true, valuelineenabled: true, valuelinealpha: 0.5 }, periodselector: { position: "left", periods: [{ period: "mm", selected: true, count: 1, label: "1 month" }, { period: "yyyy", count: 1, label: "1 year" }, { period: "ytd", label: "ytd" }, { period: "max", label: "max" }] }, datasetselector: { position: "left" } }); </script>
the json file output info function
[{"date":"2011-01-10","student":"100"},{"date":"2012-02-11","student":"122"}]
anyone know solution please help. thanks.
mysql json amcharts
Comments
Post a Comment