Created
May 3, 2019 01:33
-
-
Save gpDA/8d69fcb5216c8e9aae608d72407c9ceb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| d3.json("/sentiment-endpoint", function(data) { | |
| var height = $("body").height()*0.6 - $(".panel-header").height() - 20, | |
| width = $("body").width()*0.6 - 10, | |
| stock = d3.stock(); | |
| var chart = d3.select("#chart").append("svg") | |
| .attr("width", width) | |
| .attr("height", height) | |
| .attr('class', 'chart') | |
| .attr('id','stockchart') | |
| .datum(data) | |
| var panel1 = stock(chart); | |
| // price | |
| printPrice1(data.list[data.list.length-1]); | |
| // menu | |
| $(".style").click(function(e){ | |
| $("#style").css({ | |
| top: "36px", | |
| left: $(".style").offset().left, | |
| right: "auto", | |
| display: "block", | |
| }); | |
| $(document).one("click", function(){ | |
| $("#style").css({display: "none"}); | |
| }); | |
| e.stopPropagation(); | |
| }); | |
| //... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment