Commit 45dab21f authored by Moreau Nicolas's avatar Moreau Nicolas
Browse files

makes spectra a little bit higher, hides zoom button on highcharts graph

parent fed48e43
......@@ -3,8 +3,8 @@
const PLOT_WIDTH_1D = 1400;
const PLOT_WIDTH_3D = 780;
// height of the plotted spectra, this is a width ratio
const PLOT_HEIGHT_RATIO_1D = "50%";
const PLOT_HEIGHT_RATIO_3D = "65%";
const PLOT_HEIGHT_RATIO_1D = "70%";
const PLOT_HEIGHT_RATIO_3D = "70%";
// default line color on graph
const PLOT_DEFAULT_COLOR = "#2242c7";
// default line width on graph
......
......@@ -1714,10 +1714,17 @@ class SingleSpectrumViewer extends SpectrumViewer {
width: self._width,
height: self._heightWidthRatio,
animation: false,
zoomType: 'x',
zoomType: 'xz',
panning: true,
panKey: 'shift',
events: {
render: function(event){
// hides zoom button when it is displayed
// we only use zoom button defined in yafits UI
if(this.resetZoomButton !== undefined){
this.resetZoomButton.hide();
}
},
load: function (event) {
// graph is loaded
DOMAccessor.showLoaderAction(false);
......@@ -2610,7 +2617,7 @@ class SummedPixelsSpectrumViewer extends SpectrumViewer {
* @returns {chart}
*/
_getChart() {
var self = this;
let self = this;
let target = document.getElementById(this._containerId);
return Highcharts.chart(target, {
title: {
......@@ -2631,6 +2638,7 @@ class SummedPixelsSpectrumViewer extends SpectrumViewer {
selection: function (event) {
//console.clear();
// overplot selected area in blue
console.log(this);
this.xAxis[0].update({
plotBands: [{
from: event.xAxis[0].min,
......@@ -3063,7 +3071,7 @@ function getViewLinker(radecRange, spectroUI, sourceTable, markerList) {
viewLinker.getAndPlotSingleSlice(Math.floor(FITS_HEADER.naxis3 / 2));
viewLinker.getAndPlotSummedSlices(0, FITS_HEADER.naxis3 - 1);
let spectrumViewer = new SingleSpectrumViewer(dataPaths, 'spectrum', PLOT_WIDTH_3D);
let spectrumViewer = new SingleSpectrumViewer(dataPaths, 'spectrum', PLOT_WIDTH_3D, PLOT_HEIGHT_RATIO_3D);
spectrumViewer.setViewLinker(viewLinker);
viewLinker.setSpectrumViewer(spectrumViewer);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment