visualifyjs 2.5.3-2.dev → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visualifyjs",
3
- "version": "2.5.3-2.dev",
3
+ "version": "2.5.3",
4
4
  "main": "dist/visualify.js",
5
5
  "homepage": "https://visualify.pharmacy.arizona.edu",
6
6
  "license": "GNU General Public License v3.0",
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author : Lihao leolihao@arizona.edu
3
3
  * @Date : 2023-11-12 17:35:02
4
- * @FilePath : /visualify.js/src/core/components/parser.scatterBio.js
4
+ * @FilePath : /visualifyjs/src/core/components/parser.scatterBio.js
5
5
  * @Description :
6
6
  * Copyright (c) 2023 by Lihao (leolihao@arizona.edu), All Rights Reserved.
7
7
  */
@@ -188,7 +188,7 @@ export const handleAPI = async (config, sharedData, bbox = false) => {
188
188
  //console.log(`result for ${item} : `, result);
189
189
  fetched_dat[item] = result;
190
190
  } else if (id) {
191
- //console.log(`dep2 id for ${item} : `, id, dependencies);
191
+ //console.log(`id for ${item} : `, id, dependencies);
192
192
 
193
193
  const result = await simplefetch(href, {
194
194
  id: dependencies[dep] + '/' + id,
@@ -255,8 +255,6 @@ export const parseData = (fetched, config, sharedData) => {
255
255
  throw new Error('fetched data is not valid: ' + fetched);
256
256
  }
257
257
 
258
- //console.log(`fetched: `, fetched);
259
-
260
258
  const metadata = fetched.metadata;
261
259
  const genes = fetched.gene;
262
260
 
@@ -294,7 +292,7 @@ export const parseData = (fetched, config, sharedData) => {
294
292
  config?.mapping?.axis,
295
293
  ),
296
294
  legend: handleLegend(category),
297
- visualMap: handleVisualMap(genes, config.visualmap),
295
+ visualMap: handleVisualMap(genes),
298
296
  title: fetched?.fetched_ID?.gene ?? '',
299
297
  };
300
298
  } catch (error) {
@@ -543,13 +541,9 @@ const handleLegend = (category) => {
543
541
  return legend;
544
542
  };
545
543
 
546
- const handleVisualMap = (genes, visualmap = {}) => {
544
+ const handleVisualMap = (genes) => {
547
545
  if (!genes) return [];
548
546
  // Initialize max and min variables with the first value in the object
549
-
550
- console.log(`visualmap in handleVisualMap: `, visualmap);
551
-
552
-
553
547
  let maxValue = Number.NEGATIVE_INFINITY;
554
548
  let minValue = Number.POSITIVE_INFINITY;
555
549
  let visualMap = {};
@@ -580,8 +574,6 @@ const handleVisualMap = (genes, visualmap = {}) => {
580
574
  writingMode: 'vertical-lr',
581
575
  };
582
576
 
583
- visualMap = { ...visualMap, ...visualmap };
584
-
585
577
  //console.log(`handlesVisualMap: `, visualMap);
586
578
  return visualMap;
587
579
  };
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author : Lihao leolihao@arizona.edu
3
3
  * @Date : 2023-11-06 17:23:59
4
- * @FilePath : /visualify.js/src/core/components/scatterL.js
4
+ * @FilePath : /visualifyjs/src/core/components/scatterL.js
5
5
  * @Description :
6
6
  * Copyright (c) 2023 by Lihao (leolihao@arizona.edu), All Rights Reserved.
7
7
  */
@@ -32,7 +32,7 @@ function ScatterBio({ props, style }) {
32
32
 
33
33
  useEffect(() => {
34
34
  let option = parseConfig(props);
35
- //console.log('option: ', option);
35
+ console.log('option: ', option);
36
36
  let fetched_dat = null;
37
37
 
38
38
  // Check if the sharedData has changed
@@ -68,7 +68,7 @@ function ScatterBio({ props, style }) {
68
68
  sharedData,
69
69
  ibox,
70
70
  );
71
- //console.log(fetched_dat, 'fetched_dat');
71
+ console.log(fetched_dat, 'fetched_dat');
72
72
  }
73
73
  var { series, legend, visualMap, title } = parseData(
74
74
  fetched_dat,
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author : Lihao leolihao@arizona.edu
3
3
  * @Date : 2023-12-01 14:21:40
4
- * @FilePath : /visualify.js/src/core/modules/echartswitcher.js
4
+ * @FilePath : /visualifyjs/src/core/modules/echartswitcher.js
5
5
  * @Description :
6
6
  * Copyright (c) 2023 by Lihao (leolihao@arizona.edu), All Rights Reserved.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author : Lihao leolihao@arizona.edu
3
3
  * @Date : 2023-12-02 11:56:41
4
- * @FilePath : /visualify.js/src/core/parser/echart.general.js
4
+ * @FilePath : /visualifyjs/src/core/parser/echart.general.js
5
5
  * @Description :
6
6
  *
7
7
  * Copyright (c) 2023 by Lihao (leolihao@arizona.edu), All Rights Reserved.
@@ -33,14 +33,11 @@ const _parser_gereral = (options = {}, preset = {}) => {
33
33
 
34
34
  if ('xAxis' in options) {
35
35
  if (options.xAxis === false) parsedOptions.xAxis = { show: false };
36
- else if (Array.isArray(options.xAxis)) {
36
+ else if (options.xAxis)
37
37
  parsedOptions.xAxis = {
38
38
  ...parsedOptions?.xAxis,
39
39
  data: options.xAxis,
40
40
  };
41
- } else {
42
- parsedOptions.xAxis = options.xAxis;
43
- }
44
41
  }
45
42
 
46
43
  if ('yAxis' in options) {
@@ -50,7 +47,6 @@ const _parser_gereral = (options = {}, preset = {}) => {
50
47
  ...parsedOptions?.yAxis,
51
48
  data: options.yAxis,
52
49
  };
53
- else parsedOptions.yAxis = options.yAxis;
54
50
  }
55
51
 
56
52
  if ('xAxisLabel' in options) {