diff --git a/js/ds.js b/js/ds.js
index 7934403..8a10e48 100644
--- a/js/ds.js
+++ b/js/ds.js
@@ -126,8 +126,6 @@ DataSpace.renderReport = async function (report, archesJson, images)
this.getRelatedAnalysisId(archesJson)
);
- console.log(this.getRelatedAnalysisId(archesJson));
-
container.innerHTML += await this.renderAnalysisReport(
report.resource,
report.displayname
@@ -155,7 +153,7 @@ DataSpace.renderAnalysisReport = async function (resource, type)
const shape = this.createShape(resource, 'Analysis');
let html = `
-
${type.replace(/(\w+\s\w+).*$/,"$1")}
+
${type.replace(/(\w+\s\w+).*$/,"$1")}
`;
let table = '
';
@@ -207,7 +205,6 @@ DataSpace.renderAnalysisReport = async function (resource, type)
const spectra = resource['Analysis Spectra'][0];
const rawData = await this.fetchFileUrl(spectra['Spectrum Raw Data']);
const interpreted = await this.fetchFileUrl(spectra['Spectrum Interpreted Data']);
- console.warn(rawData, interpreted);
return html;
}
diff --git a/js/plot.js b/js/plot.js
index d09df66..4cdb6af 100644
--- a/js/plot.js
+++ b/js/plot.js
@@ -34,7 +34,6 @@ const techniques = {
'XRF' : processXRF,
};
/**
- * @todo process rawData and check spectrum type?
* @param {string} rawData
* @param {string} technique XRD, XRF
* @param {string} containerId
@@ -47,11 +46,18 @@ export function plot(rawData, technique, containerId)
const spectrumType = techniques[technique];
const processed = spectrumType.process(rawData);
- Plotly.newPlot(container,
+ Plotly.newPlot(
+ container,
[{
x: processed[0],
y: processed[1],
}],
+ {
+ hovermode:'closest',
+ title: 'Hover with mouse on data points to see annotations',
+ xaxis: { zeroline : false, title : spectrumType.x_title },
+ yaxis: { zeroline : false, title : spectrumType.y_title }
+ },
{
margin: {t: 0}
}