st-comp 0.0.176 → 0.0.178

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,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.176",
4
+ "version": "0.0.178",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -485,7 +485,11 @@ const draw = (params = { startValue: 0, endValue: 0 }) => {
485
485
  const interval = Math.abs((max - min) / 10);
486
486
  return round(min - interval);
487
487
  },
488
- max: (value) => round(value.max),
488
+ max: (value) => {
489
+ const { min, max } = value;
490
+ const interval = Math.abs((max - min) / 10);
491
+ return round(max + interval);
492
+ },
489
493
  },
490
494
  {
491
495
  show: false,
@@ -648,7 +652,6 @@ const drawScreenMaxPrice = () => {
648
652
  maxPriceIndex = i;
649
653
  }
650
654
  }
651
-
652
655
  const originOption = mainChartIns.getOption();
653
656
  const filterSeries = originOption.series?.filter((item) => item.name !== "maxPrice") || [];
654
657
  const dataLength = endValue - startValue;
@@ -657,10 +660,10 @@ const drawScreenMaxPrice = () => {
657
660
  let formatter = `←${maxPrice}`;
658
661
  if (positionInView > 0.7) {
659
662
  position = "left";
660
- formatter = `${maxPrice}→`;
663
+ formatter = `${round(maxPrice)}→`;
661
664
  } else {
662
665
  position = "right";
663
- formatter = `←${maxPrice}`;
666
+ formatter = `←${round(maxPrice)}`;
664
667
  }
665
668
  mainChartIns?.setOption(
666
669
  {
@@ -74,12 +74,12 @@ const cycleOptions = [
74
74
  { label: "1mon", value: "8" },
75
75
  ];
76
76
 
77
- const varietyName = ref("棉花");
78
- const varietyCode = ref("CF");
79
- const varietyStock = ref(0); // 0: 期货, 1: 股票, 2: 期权
77
+ const varietyName = ref("国债指数");
78
+ const varietyCode = ref("Z000012");
79
+ const varietyStock = ref(1); // 0: 期货, 1: 股票, 2: 期权
80
80
  const tradeLog = ref(tradeLogMock);
81
81
  const netPositionData = ref([]);
82
- const cycle = ref("6");
82
+ const cycle = ref("5");
83
83
  const sellBuy = ref(1);
84
84
  const rightType = ref(1);
85
85
  const klineType = ref(0);