diff --git a/src/components/AeShow/index.vue b/src/components/AeShow/index.vue
index ffe2c64..99e5204 100644
--- a/src/components/AeShow/index.vue
+++ b/src/components/AeShow/index.vue
@@ -62,6 +62,7 @@ import { inflate } from 'pako'
import * as echarts from 'echarts'
import {useRouter, onBeforeRouteUpdate} from "vue-router";
import { ref, onMounted, nextTick } from 'vue'
+import {getBoxTooltips,options} from './option'
const router = useRouter();
const drawer = ref(false)
const emit = defineEmits(['changeLoading'])
@@ -112,37 +113,6 @@ const tagsTotal = [
"esophagus",
"placenta",
]
-//
-const boxTooltips = {
- trigger: 'item',
- axisPointer: {
- type: 'shadow'
- },
- textStyle: {},
- formatter: function (param) {
- return [
- "
" +
- param.data[0] +
- '
',
- '
',
- "Max:" +
- parseFloat(param.data[5]).toFixed(2) +
- '
',
- "Q3:" +
- parseFloat(param.data[4]).toFixed(2) +
- '
',
- "Median:" +
- parseFloat(param.data[3]).toFixed(2) +
- '
',
- "Q1:" +
- parseFloat(param.data[2]).toFixed(2) +
- '
',
- "Min:" +
- parseFloat(param.data[1]).toFixed(2) +
- '
'
- ].join('')
- }
- }
protein.value = Array.isArray(router.currentRoute.value.query.protein) ? router.currentRoute.value.query.protein : [router.currentRoute.value.query.protein]
routerName.value = router.currentRoute.value.name
// get proteins
@@ -265,65 +235,6 @@ const initData = (data) => {
tags
}
}
-// option
-const options = {
- // backgroundColor: '#f4f5f2',
- title: [
- ],
- dataset: [
- ],
- tooltip: {},
- // color: tagsColor,
- legend: {
- show: true,
- orient: 'vertical',
- right: 10,
- top: 60,
- data: []
- // bottom: 20,
- },
- grid: {
- left: '10%',
- right: '10%',
- bottom: 60
- },
- yAxis: {
- type: 'category',
- boundaryGap: true,
- nameGap: 30,
- splitArea: {
- show: false
- },
- splitLine: {
- show: false
- }
- },
- xAxis: {
- type: 'value',
- name: 'iBAQLog',
- nameLocation: 'center',
- nameGap: 40,
- splitArea: {
- show: false
- },
- splitLine: {
- show: false
- },
- min: 1,
- //max: 10
- },
- toolbox: {
- feature: {
- saveAsImage: {
- type: 'png',
- title: 'save as .png',
- pixelRatio: 10
- }
- }
- },
- series: [
- ]
-}
// init image
const init = () => {
if (dataHistory.value.length === 1) {
@@ -390,9 +301,9 @@ const init = () => {
color0: '#FA0000',
borderColor: '#030609',
borderColor0: '#030609',
- }
+ },
})
- options.tooltip = boxTooltips
+ options.tooltip = getBoxTooltips(samples)
}
} else {
if (routerName.value === 'tissues') {
@@ -500,7 +411,7 @@ const init = () => {
}
})
})
- options.tooltip = boxTooltips
+ options.tooltip = getBoxTooltips(samples)
}
}
diff --git a/src/components/AeShow/option.js b/src/components/AeShow/option.js
new file mode 100644
index 0000000..6772634
--- /dev/null
+++ b/src/components/AeShow/option.js
@@ -0,0 +1,97 @@
+const getBoxTooltips = (samples) => {
+ return {
+ trigger: 'item',
+ axisPointer: {
+ type: 'shadow'
+ },
+ textStyle: {},
+ formatter: function (param) {
+ return [
+ "" +
+ param.data[0] +
+ '
',
+ '
',
+ "Max:" +
+ parseFloat(param.data[5]).toFixed(2) +
+ '
',
+ "Q3:" +
+ parseFloat(param.data[4]).toFixed(2) +
+ '
',
+ "Median:" +
+ parseFloat(param.data[3]).toFixed(2) +
+ '
',
+ "Q1:" +
+ parseFloat(param.data[2]).toFixed(2) +
+ '
',
+ "Min:" +
+ parseFloat(param.data[1]).toFixed(2) +
+ '
',
+ "Samples:" +
+ (Array.isArray(samples[0])?samples[param.componentIndex][param.dataIndex]:samples[param.dataIndex]) +
+ '
',
+ ].join('')
+ }
+ }
+}
+
+// option
+const options = {
+ // backgroundColor: '#f4f5f2',
+ title: [
+ ],
+ dataset: [
+ ],
+ tooltip: {},
+ // color: tagsColor,
+ legend: {
+ show: true,
+ orient: 'vertical',
+ right: 10,
+ top: 60,
+ data: []
+ // bottom: 20,
+ },
+ grid: {
+ left: '10%',
+ right: '10%',
+ bottom: 60
+ },
+ yAxis: {
+ type: 'category',
+ boundaryGap: true,
+ nameGap: 30,
+ splitArea: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ }
+ },
+ xAxis: {
+ type: 'value',
+ name: 'iBAQLog',
+ nameLocation: 'center',
+ nameGap: 40,
+ splitArea: {
+ show: false
+ },
+ splitLine: {
+ show: false
+ },
+ min: 1,
+ //max: 10
+ },
+ toolbox: {
+ feature: {
+ saveAsImage: {
+ type: 'png',
+ title: 'save as .png',
+ pixelRatio: 10
+ }
+ }
+ },
+ series: [
+ ]
+}
+
+export {getBoxTooltips,options}
\ No newline at end of file
diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index 4805a7c..83b3137 100644
--- a/src/views/overview/index.vue
+++ b/src/views/overview/index.vue
@@ -92,6 +92,7 @@
Q14114
+ Help: iBAQLog
@@ -273,6 +274,14 @@ h1 {
color:#84c7d0;
cursor: pointer;
}
+.el-text span a {
+ text-decoration: none;
+}
+
+.el-text span a:hover{
+ color:#84c7d0;
+ cursor: pointer;
+}
.select-box {
margin: 0.5rem 0;
> span {