Last active
November 6, 2017 13:31
-
-
Save Cyrille37/d3616d513191364a7fdcf0a76f264668 to your computer and use it in GitHub Desktop.
Plotly
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> | |
<html lang="fr"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Plot2</title> | |
<meta name="description" content="" /> | |
<meta name="author" content="" /> | |
<!--link rel="shortcut icon" href="favicon.ico" /--> | |
<!--link rel="stylesheet" href="main.css" media="screen" /--> | |
</head> | |
<body> | |
<h1>Plot2</h1> | |
<div id="plot1" class="" style="height:520px; width:100%;"></div> | |
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script> | |
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> | |
<script> | |
var layout = { | |
xaxis: { | |
type: 'date', | |
rangeselector: true, | |
autorange: true, | |
tickangle: -30, | |
tickmode: 'auto', | |
nticks: 10 | |
}, | |
yaxis2: { | |
side: 'right', | |
} | |
}; | |
var data = [ | |
{ | |
type: 'scatter', | |
x: [1509087123000, 1509142117000], | |
y: [50,200] | |
}, | |
{ | |
type: 'scatter', | |
x: [1509102176000, 1509223734000], | |
y: [100,3000], | |
yaxis: 'y2' | |
} | |
]; | |
$(function() | |
{ | |
Plotly.newPlot( 'plot1', data, layout ); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment