Last active
August 8, 2017 21:29
-
-
Save openjck/621505033bc9b22d7d24eb7f48f65062 to your computer and use it in GitHub Desktop.
HTML document demonstrating the issue described in metricsgraphics/metrics-graphics#764
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="en-US" dir="ltr"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Example</title> | |
<link href="https://rawgit.com/mozilla/metrics-graphics/4722d8a7aaaea604a942f6b39bd169b9bfa815fb/dist/metricsgraphics.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div id="target"></div> | |
<script src="https://d3js.org/d3.v4.js"></script> | |
<script src="https://rawgit.com/mozilla/metrics-graphics/4722d8a7aaaea604a942f6b39bd169b9bfa815fb/dist/metricsgraphics.js"></script> | |
<script> | |
const exampleData = [ | |
{ x: 1, y: 1000 }, | |
{ x: 2, y: 2000 }, | |
{ x: 100, y: 3000 }, | |
]; | |
MG.data_graphic({ | |
target: '#target', | |
data: exampleData, | |
x_accessor: 'x', | |
y_accessor: 'y', | |
y_label: 'Example Y Label', | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment