tvcharts 0.9.37 → 0.9.38

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.
@@ -54,6 +54,14 @@ var positiveColorQuery = ['itemStyle', 'color'];
54
54
  var negativeColorQuery = ['itemStyle', 'color0'];
55
55
  var positiveWickColorQuery = ['itemStyle', 'wickColor'];
56
56
  var negativeWickColorQuery = ['itemStyle', 'wickColor0'];
57
+ function getFormatSumVol(vol) {
58
+ if (vol > 1000000) {
59
+ return vol / 1000000;
60
+ } else if (vol > 1000) {
61
+ return vol / 1000;
62
+ }
63
+ return vol;
64
+ }
57
65
  function getColor(sign, model, ignoreParentColor) {
58
66
  return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery, ignoreParentColor);
59
67
  }
@@ -155,6 +163,7 @@ var volPathLayout = {
155
163
  var textColorByBg = new Map();
156
164
  var lastIndex = candleData.count(true) - 1;
157
165
  var maxSumVol = 0;
166
+ var maxFSumVol = 0;
158
167
  var rectHeight = 0;
159
168
  for (var dataIndex = params.start; dataIndex < params.end; dataIndex++) {
160
169
  if (showLast && lastIndex - candleData.getRawIndex(dataIndex) >= showLast) {
@@ -245,8 +254,10 @@ var volPathLayout = {
245
254
  var leftX = buyX;
246
255
  var firstBottomY = 0;
247
256
  var maxVol = Math.max(maxBuy, maxSell);
248
- if (maxVol > maxSumVol) {
257
+ var maxFVol = getFormatSumVol(maxVol);
258
+ if (maxFVol > maxFSumVol) {
249
259
  maxSumVol = maxVol;
260
+ maxFSumVol = maxFVol;
250
261
  }
251
262
  // const pocItem = volList[pocIndex];
252
263
  each(volList, function (item, i) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tvcharts",
3
- "version": "0.9.37",
3
+ "version": "0.9.38",
4
4
  "main": "dist/echarts.js",
5
5
  "module": "index.js",
6
6
  "jsdelivr": "dist/echarts.min.js",