diff --git a/easyDiffractionApp/Gui/Components/Pages/Analysis/MainContent/QtCharts1dTab.qml b/easyDiffractionApp/Gui/Components/Pages/Analysis/MainContent/QtCharts1dTab.qml index 83a9c95..0280228 100644 --- a/easyDiffractionApp/Gui/Components/Pages/Analysis/MainContent/QtCharts1dTab.qml +++ b/easyDiffractionApp/Gui/Components/Pages/Analysis/MainContent/QtCharts1dTab.qml @@ -52,12 +52,22 @@ Column { EaCharts.QtCharts1dBase { id: mainChart + property var experimentDataBlocksNoMeas: Globals.Proxies.main.experiment.dataBlocksNoMeas + onExperimentDataBlocksNoMeasChanged: { + if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'cwl') { + axisX.title = '2θ (degree)' + } else if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'tof') { + axisX.title = 'TOF (µs)' + } else { + axisX.title = '' + } + } + anchors.topMargin: EaStyle.Sizes.toolButtonHeight - EaStyle.Sizes.fontPixelSize - 1 anchors.bottomMargin: -12 - EaStyle.Sizes.fontPixelSize useOpenGL: container.useOpenGL - axisX.title: "2θ (degree)" axisX.titleVisible: false axisX.labelsVisible: false axisX.min: Globals.Proxies.rangeValue('xMin') diff --git a/easyDiffractionApp/Gui/Components/Pages/Experiment/MainContent/QtCharts1dTab.qml b/easyDiffractionApp/Gui/Components/Pages/Experiment/MainContent/QtCharts1dTab.qml index 6f4622e..d8e9ba6 100644 --- a/easyDiffractionApp/Gui/Components/Pages/Experiment/MainContent/QtCharts1dTab.qml +++ b/easyDiffractionApp/Gui/Components/Pages/Experiment/MainContent/QtCharts1dTab.qml @@ -21,11 +21,21 @@ Rectangle { EaCharts.QtCharts1dMeasVsCalc { id: chartView + property var experimentDataBlocksNoMeas: Globals.Proxies.main.experiment.dataBlocksNoMeas + onExperimentDataBlocksNoMeasChanged: { + if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'cwl') { + axisX.title = '2θ (degree)' + } else if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'tof') { + axisX.title = 'TOF (µs)' + } else { + axisX.title = '' + } + } + anchors.topMargin: EaStyle.Sizes.toolButtonHeight - EaStyle.Sizes.fontPixelSize - 1 useOpenGL: EaGlobals.Vars.useOpenGL //Globals.Proxies.main.plotting.useWebGL1d - axisX.title: "2θ (degree)" axisX.min: Globals.Proxies.rangeValue('xMin') axisX.max: Globals.Proxies.rangeValue('xMax') axisX.minAfterReset: Globals.Proxies.rangeValue('xMin') diff --git a/easyDiffractionApp/Gui/Components/Pages/Experiment/SideBarBasic.qml b/easyDiffractionApp/Gui/Components/Pages/Experiment/SideBarBasic.qml index 96f0d0c..7784b4a 100644 --- a/easyDiffractionApp/Gui/Components/Pages/Experiment/SideBarBasic.qml +++ b/easyDiffractionApp/Gui/Components/Pages/Experiment/SideBarBasic.qml @@ -125,7 +125,7 @@ EaComponents.SideBarColumn { if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'cwl') { return Globals.Proxies.experimentLoopTitle(qsTr('Background'), '_pd_background') } else if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'tof') { - return qsTr('Background') + return Globals.Proxies.experimentLoopTitle(qsTr('Background'), '_pd_background') } } icon: 'wave-square' diff --git a/easyDiffractionApp/Gui/Components/Pages/Model/MainContent/QtCharts1dTab.qml b/easyDiffractionApp/Gui/Components/Pages/Model/MainContent/QtCharts1dTab.qml index 89d7e76..3d22dab 100644 --- a/easyDiffractionApp/Gui/Components/Pages/Model/MainContent/QtCharts1dTab.qml +++ b/easyDiffractionApp/Gui/Components/Pages/Model/MainContent/QtCharts1dTab.qml @@ -16,9 +16,19 @@ import Gui.Globals as Globals EaCharts.QtCharts1dMeasVsCalc { id: chart + property var experimentDataBlocksNoMeas: Globals.Proxies.main.experiment.dataBlocksNoMeas + onExperimentDataBlocksNoMeasChanged: { + if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'cwl') { + axisX.title = '2θ (degree)' + } else if (Globals.Proxies.experimentMainParam('_diffrn_radiation', 'type').value === 'tof') { + axisX.title = 'TOF (µs)' + } else { + axisX.title = '' + } + } + useOpenGL: EaGlobals.Vars.useOpenGL //Globals.Proxies.main.plotting.useWebGL1d - axisX.title: "2θ (degree)" axisX.min: parameterValue('xMin') axisX.max: parameterValue('xMax')