gJam,
продолжайте играть в испорченный телефон
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
div {
width: 33%;
height: 80%;
}
</style>
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
<script type="text/javascript">
function foo() {
var posting = $.post( "http://echo.jsontest.com/id/a,b,c,d,e,f,g,h,j@91,91,96,95,71,100,93,81,93", { name: 1 } );
posting.done(function( data ) { data = data.id //для теста
var z = new Object();
data = data.split("@");
z.labels = data[0].split(",");
z.series = [data[1].split(",")];
new Chartist.Line('.ct-chart', z)
});
}
</script>
</head>
<body>
<input type="button" value="ok" onclick="foo();"/>
<div class="ct-chart"></div>
</body>
</html>
|