HEX
Server: Apache
System: Linux b:u:newjapaneti:1 3.10.0-1160.31.1.el7.x86_64 #1 SMP Thu Jun 10 13:32:12 UTC 2021 x86_64
User: newjapaneti (381717)
PHP: 5.6.30
Disabled: apache_get_modules, apache_get_version, apache_reset_timeout, apache_getenv, apache_note, apache_setenv
Upload Files
File: /var/www/html/newjapanetiquetas.com.br/web/docs/vendor/rickshaw/examples/jsonp.html
<!doctype>
<head>
	<link type="text/css" rel="stylesheet" href="../src/css/graph.css">
	<link type="text/css" rel="stylesheet" href="css/lines.css">

	<script src="../vendor/d3.v3.js"></script>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

	<script src="../rickshaw.js"></script>
</head>
<body>

<div id="chart_container">
	<div id="chart"></div>
</div>

<script>

// subclass to hard-code callback name so we can call this in a static context

Rickshaw.Graph.JSONP.Static = Rickshaw.Class.create( Rickshaw.Graph.JSONP, {
	request: function() {
		$.ajax( {
			url: this.dataURL,
			success: this.success.bind(this),
			error: this.error.bind(this),
			dataType: 'jsonp',
			jsonpCallback: 'callback'
		} );
	}
} );

var jsonpGraph = new Rickshaw.Graph.JSONP.Static( {

	element: document.getElementById("chart"),
	width: 400,
	height: 200,
	renderer: 'line',
	dataURL: 'data/data.jsonp',
	onData: function(d) { Rickshaw.Series.zeroFill(d); return d },
	series: [
		{
			name: 'New York',
			color: '#c05020',
		}, {
			name: 'London',
			color: '#30c020',
		}, {
			name: 'Tokyo',
			color: '#6060c0'
		}
	]
} );

</script>

</body>