Created
June 13, 2015 07:37
-
-
Save jes-moore/af6094c2b8055c77546d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.css'> | |
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script> | |
<script src='//d3js.org/d3.v3.min.js' type='text/javascript'></script> | |
<script src='//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.js' type='text/javascript'></script> | |
<script src='//nvd3.org/assets/lib/fisheye.js' type='text/javascript'></script> | |
<style> | |
.rChart { | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
width: 800px; | |
height: 400px; | |
} | |
</style> | |
</head> | |
<body > | |
<div id = 'chart3a987c311c5b' class = 'rChart nvd3'></div> | |
<script type='text/javascript'> | |
$(document).ready(function(){ | |
drawchart3a987c311c5b() | |
}); | |
function drawchart3a987c311c5b(){ | |
var opts = { | |
"dom": "chart3a987c311c5b", | |
"width": 800, | |
"height": 400, | |
"x": "a.Date", | |
"y": "a.Close", | |
"type": "scatterChart", | |
"id": "chart3a987c311c5b" | |
}, | |
data = [ | |
{ | |
"a.Date": 16596, | |
"a.Headline": "Appendix 3B", | |
"a.Pages": "13", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01632288", | |
"a.Close": 1.08 | |
}, | |
{ | |
"a.Date": 16589, | |
"a.Headline": "Results of Meeting", | |
"a.Pages": "1", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01630616", | |
"a.Close": 1.12 | |
}, | |
{ | |
"a.Date": 16582, | |
"a.Headline": "Brett Lee signs on as Global Brand Ambassador for Zipt", | |
"a.Pages": "3", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01628514", | |
"a.Close": 0.91 | |
}, | |
{ | |
"a.Date": 16577, | |
"a.Headline": "Digital/social media agency secured for Zipt global rollout", | |
"a.Pages": "3", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01627401", | |
"a.Close": 0.73 | |
}, | |
{ | |
"a.Date": 16567, | |
"a.Headline": "ZipT Global Launch", | |
"a.Pages": "4", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01624427", | |
"a.Close": 0.675 | |
}, | |
{ | |
"a.Date": 16563, | |
"a.Headline": "Trading Halt", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01623664", | |
"a.Close": 0.725 | |
}, | |
{ | |
"a.Date": 16556, | |
"a.Headline": "Notice of General Meeting/Proxy Form", | |
"a.Pages": "10", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01621986", | |
"a.Close": 0.64 | |
}, | |
{ | |
"a.Date": 16556, | |
"a.Headline": "Change of Director's Interest Notice", | |
"a.Pages": "6", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01621969", | |
"a.Close": 0.64 | |
}, | |
{ | |
"a.Date": 16556, | |
"a.Headline": "Appendix 4C - quarterly", | |
"a.Pages": "9", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01621655", | |
"a.Close": 0.64 | |
}, | |
{ | |
"a.Date": 16545, | |
"a.Headline": "Capacity to Issue Equity Securities", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01617100", | |
"a.Close": 0.6 | |
}, | |
{ | |
"a.Date": 16527, | |
"a.Headline": "Change of Company Secretary and Registered Office", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01613681", | |
"a.Close": 0.525 | |
}, | |
{ | |
"a.Date": 16526, | |
"a.Headline": "Company Secretary Appointment/Resignation", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01613545", | |
"a.Close": 0.49 | |
}, | |
{ | |
"a.Date": 16525, | |
"a.Headline": "Independent Research Report on ZipTel Limited", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01612653", | |
"a.Close": 0.5 | |
}, | |
{ | |
"a.Date": 16521, | |
"a.Headline": "Becoming a substantial holder", | |
"a.Pages": "6", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01611808", | |
"a.Close": 0.515 | |
}, | |
{ | |
"a.Date": 16493, | |
"a.Headline": "Appendix 4D and Half-Year Financial Report and Accounts", | |
"a.Pages": "27", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01603923", | |
"a.Close": 0.47 | |
}, | |
{ | |
"a.Date": 16483, | |
"a.Headline": "ZIP signs Landmark agreement with Global Satellite Provider", | |
"a.Pages": "3", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01599535", | |
"a.Close": 0.515 | |
}, | |
{ | |
"a.Date": 16479, | |
"a.Headline": "Trading Halt", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01598669", | |
"a.Close": 0.495 | |
}, | |
{ | |
"a.Date": 16469, | |
"a.Headline": "Unauthorised application in Google Play store", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01596043", | |
"a.Close": 0.425 | |
}, | |
{ | |
"a.Date": 16468, | |
"a.Headline": "Successful completion of ZipT App Phase One Pilot rollout", | |
"a.Pages": "3", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01595689", | |
"a.Close": 0.45 | |
}, | |
{ | |
"a.Date": 16465, | |
"a.Headline": "Appendix 4C - Dec Quarterly and Activities Report", | |
"a.Pages": "9", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01595052", | |
"a.Close": 0.49 | |
}, | |
{ | |
"a.Date": 16455, | |
"a.Headline": "Explosion of Global Traffic to ZipT Website - Revised", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01592016", | |
"a.Close": 0.51 | |
}, | |
{ | |
"a.Date": 16455, | |
"a.Headline": "Explosion of Global Traffic to ZipT Website", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01592009", | |
"a.Close": 0.51 | |
}, | |
{ | |
"a.Date": 16449, | |
"a.Headline": "Response to ASX Price and Volume Query", | |
"a.Pages": "4", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01591169", | |
"a.Close": 0.475 | |
}, | |
{ | |
"a.Date": 16443, | |
"a.Headline": "ZipT Pilot Phase Initial Update", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01590083", | |
"a.Close": 0.385 | |
}, | |
{ | |
"a.Date": 16427, | |
"a.Headline": "Change of Director's Interest Notice - Appendix 3Y", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01587663", | |
"a.Close": 0.3 | |
}, | |
{ | |
"a.Date": 16422, | |
"a.Headline": "ZipTel Releases Promotional VIP Video for New ZipT App", | |
"a.Pages": "2", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01586000", | |
"a.Close": 0.25 | |
}, | |
{ | |
"a.Date": 16420, | |
"a.Headline": "ZipT Launches App to Over 130,000 Users in Pilot Phase", | |
"a.Pages": "3", | |
"a.PDF": "PDF", | |
"a.Links": "http://www.asx.com.au/asx/statistics/displayAnnouncement.do?display=pdf&idsId=01585115", | |
"a.Close": 0.285 | |
} | |
] | |
if(!(opts.type==="pieChart" || opts.type==="sparklinePlus" || opts.type==="bulletChart")) { | |
var data = d3.nest() | |
.key(function(d){ | |
//return opts.group === undefined ? 'main' : d[opts.group] | |
//instead of main would think a better default is opts.x | |
return opts.group === undefined ? opts.y : d[opts.group]; | |
}) | |
.entries(data); | |
} | |
if (opts.disabled != undefined){ | |
data.map(function(d, i){ | |
d.disabled = opts.disabled[i] | |
}) | |
} | |
nv.addGraph(function() { | |
var chart = nv.models[opts.type]() | |
.width(opts.width) | |
.height(opts.height) | |
if (opts.type != "bulletChart"){ | |
chart | |
.x(function(d) { return d[opts.x] }) | |
.y(function(d) { return d[opts.y] }) | |
} | |
chart | |
.tooltipContent( function(key, x, y, e ){ | |
d3.selectAll('[class*=\"nv-path\"]').on('click',function(){ | |
//uncomment debugger if you want to see what you have | |
//debugger; | |
window.open(d3.select(this).datum().announcements['point'][4].a.Links,'_blank'); | |
//as stated in the r code generating this | |
//the link address might be in the data that we already have | |
//window.open( | |
// 'http://example.com/' + d3.select(this).datum().data['point'][4].name, | |
// '_blank' | |
//); | |
}) | |
//looks like the actual point is below the hover tooltip path | |
//if tooltips disabled we could do click on the actual points | |
//d3.selectAll('.nv-group circle').on('click',function(){ | |
// debugger; | |
//}) | |
var d = e.series.values[e.pointIndex]; | |
return 'x: ' + x + ' y: ' + y + ' name: ' + d.name | |
} ) | |
chart.xAxis | |
.axisLabel("Date") | |
chart.yAxis | |
.axisLabel("Share Price") | |
.width( 50) | |
d3.select("#" + opts.id) | |
.append('svg') | |
.datum(data) | |
.transition().duration(500) | |
.call(chart); | |
nv.utils.windowResize(chart.update); | |
return chart; | |
}); | |
}; | |
</script> | |
<script></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment