Skip to content

Instantly share code, notes, and snippets.

@ankitsinghaniyaz
Created February 12, 2016 02:45
Show Gist options
  • Save ankitsinghaniyaz/ecd2a7f0b7abd611ed9a to your computer and use it in GitHub Desktop.
Save ankitsinghaniyaz/ecd2a7f0b7abd611ed9a to your computer and use it in GitHub Desktop.
my Chart1
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='//code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='//code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='//code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<script src='//code.highcharts.com/modules/exporting.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 400px;
}
</style>
</head>
<body >
<div id = 'chart31428c74160' class = 'rChart highcharts'></div>
<script type='text/javascript'>
(function($){
$(function () {
var chart = new Highcharts.Chart({
"dom": "chart31428c74160",
"width": 800,
"height": 400,
"credits": {
"text": "Created with rCharts",
"href": "rCharts"
},
"exporting": {
"enabled": false
},
"title": [
"This is a Title"
],
"yAxis": [
{
"title": {
"text": "mpg"
}
}
],
"series": [
{
"data": [
[
1.513,
30.4
],
[
1.615,
30.4
],
[
1.835,
33.9
],
[
1.935,
27.3
],
[
2.14,
26
],
[
2.2,
32.4
],
[
2.32,
22.8
],
[
2.465,
21.5
],
[
2.78,
21.4
],
[
3.15,
22.8
],
[
3.19,
24.4
]
],
"name": "4",
"type": "scatter",
"marker": {
"radius": 5
}
},
{
"data": [
[
2.62,
21
],
[
2.77,
19.7
],
[
2.875,
21
],
[
3.215,
21.4
],
[
3.44,
17.8
],
[
3.44,
19.2
],
[
3.46,
18.1
]
],
"name": "6",
"type": "scatter",
"marker": {
"radius": 5
}
},
{
"data": [
[
3.17,
15.8
],
[
3.435,
15.2
],
[
3.44,
18.7
],
[
3.52,
15.5
],
[
3.57,
14.3
],
[
3.57,
15
],
[
3.73,
17.3
],
[
3.78,
15.2
],
[
3.84,
13.3
],
[
3.845,
19.2
],
[
4.07,
16.4
],
[
5.25,
10.4
],
[
5.345,
14.7
],
[
5.424,
10.4
]
],
"name": "8",
"type": "scatter",
"marker": {
"radius": 5
}
}
],
"xAxis": [
{
"title": {
"text": "wt"
}
}
],
"subtitle": [
"This is a subtitle"
],
"legend": {
"title": {
"text": "Number"
},
"align": "right",
"verticalAlign": "middle",
"layout": "vertical"
},
"plotOptions": {
"scatter": {
"marker": {
"symbol": "circle"
}
}
},
"colors": [ "rgba(223, 83, 83, .75)", "rgba(60, 179, 113, .75)", "rgba(238, 130, 238, .75)" ],
"id": "chart31428c74160",
"chart": {
"renderTo": "chart31428c74160"
}
});
});
})(jQuery);
</script>
<script></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment