﻿{
  //https://www.chartjs.org/
  type: 'line',
  data: {
    datasets: [
    {
      label: 'Calculated',
      borderColor: '#880000',
      borderWidth: 2,
      pointRadius: 0,
      fill: false,
      data: ##calc
    },
    {
      label: 'Background',
      borderColor: '#000000',
      borderWidth: 4,
      pointRadius: 0,
      fill: false,
      data: ##back
    },
    {
      label: 'Residue',
      borderColor: '#000088',
      borderWidth: 2,
      pointRadius: 0,
      fill: false,
      data: ##res
    },
    {
      type: 'scatter',
      label: 'Experimental',
      backgroundColor: '#008800',
      borderColor: '#008800',
      borderWidth: 1,
      pointBorderWidth: 0,
      pointRadius: 4,
      fill: false,
      data: ##exp
    }]
  },
  options: {
    animation: false,
    responsive: true,
    title: {
			display: true,
			text: 'Sindarin diffractogram calculated'
		},
	//	tooltips: {
	//		mode: 'index',
	//		intersect: false
	//	},
    //hover: {
	//		mode: 'nearest',
	//		intersect: true
	//	},
	scales: {
      xAxes: [{
				type: 'linear',
        display: true,
        scaleLabel: {
					display: true,
					labelString: '2θ / °'
				}
			}],
			yAxes: [{
				type: 'linear',
        display: true,
				scaleLabel: {
					display: true,
					labelString: 'Intensity / a.u.'
				}
			}]		
    }	
  }
}