Skip to content

Instantly share code, notes, and snippets.

@ahmohamed
Last active October 16, 2015 22:37
Show Gist options
  • Save ahmohamed/4e73118a9b48430d5971 to your computer and use it in GitHub Desktop.
Save ahmohamed/4e73118a9b48430d5971 to your computer and use it in GitHub Desktop.
Specdraw: static mode

This example demonstrate using SpecdrawJS in static mode. This mode displays the spectrum but doesn't offer the user any interactivity with the data.

For details about SpecdrawJS.

For more examples see NMRPro.

<!DOCTYPE html>
<meta charset="utf-8">
<title>SpecdrawJS: Full client-side mode - SampleSet spectra</title>
<link rel="stylesheet" href="https://rawgit.com/ahmohamed/specdraw.js/master/specdraw.min.css" type="text/css">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="https://rawgit.com/ahmohamed/specdraw.js/master/specdraw.js"></script>
<style type="text/css">
#container {
width:960px;
height:500px;
}
</style>
<body>
<div id="container"></div>
<script>
var spec_app = specdraw.App().config(1)
.data('https://rawgit.com/cheminfo-js/jcampconverter/master/test/data/indometacin/1h.dx');
d3.select('#container').call(spec_app);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment