Fork me on GitHub
jsGraph

Simple GC-MS

Source code

"use strict";
var div1 = document.createElement( 'div' );
var div2 = document.createElement( 'div' );

var domGraph = document.getElementById( domGraph );
$.get( '../../../examples/science/_lib/gcms.jdx', {}, function( data ) {
  JcampConverter( data ).then( function( gcmsData ) {

    domGraph.appendChild( div1 );
    domGraph.appendChild( div2 );

    div2.style.width = '100%';
    div2.style.height = '100px';

    div1.style.width = '100%';
    div1.style.height = '250px';

    var gcms = new GCMS( div1, div2, {

      onlyOneMS: true
    } );

    gcms.setGC( gcmsData.gcms.gc );
    gcms.setMS( gcmsData.gcms.ms );

  } );
} )