tvcharts 0.6.79 → 0.6.81
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/dist/echarts.js +108 -33
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -1
- package/lib/chart/fills/FillsSeries.js +1 -1
- package/lib/chart/fills/fillsLayout.js +4 -2
- package/lib/component/axis/CartesianAxisView.js +10 -0
- package/lib/component/bgRect/install.js +2 -2
- package/lib/component/dataZoom/AxisProxy.js +10 -6
- package/lib/component/logo/install.js +117 -0
- package/lib/component/marker/MarkLabelModal.js +1 -0
- package/lib/component/marker/MarkLabelView.js +9 -1
- package/lib/core/echarts.js +1 -1
- package/lib/data/helper/dataProvider.js +1 -1
- package/lib/export/components.js +1 -0
- package/lib/model/Global.js +1 -0
- package/package.json +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/echarts.d.ts +1 -0
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +4 -1
- package/types/src/component/logo/install.d.ts +35 -0
- package/types/src/export/components.d.ts +1 -0
- package/types/src/util/types.d.ts +1 -0
package/dist/echarts.js
CHANGED
|
@@ -16256,6 +16256,7 @@ var BUITIN_COMPONENTS_MAP = {
|
|
|
16256
16256
|
title: "TitleComponent",
|
|
16257
16257
|
table: "TableComponent",
|
|
16258
16258
|
bgRect: "BgRectComponent",
|
|
16259
|
+
logoComponent: "LogoComponent",
|
|
16259
16260
|
timeline: "TimelineComponent",
|
|
16260
16261
|
markPoint: "MarkPointComponent",
|
|
16261
16262
|
markLine: "MarkLineComponent",
|
|
@@ -24787,14 +24788,16 @@ var ECharts = class extends Eventful_default {
|
|
|
24787
24788
|
if (!ordinalMeta) {
|
|
24788
24789
|
return;
|
|
24789
24790
|
}
|
|
24791
|
+
const seriesData = seriesModel.getData();
|
|
24792
|
+
const seriesDataIndex = seriesData.count(true) - 1;
|
|
24790
24793
|
const isUpdate = params.operation === "update";
|
|
24791
24794
|
if (isUpdate) {
|
|
24792
24795
|
seriesModel.updateValue({data: map(params.data, (item, index2) => {
|
|
24793
|
-
const idx =
|
|
24796
|
+
const idx = seriesDataIndex + index2;
|
|
24794
24797
|
const value = item.slice();
|
|
24795
24798
|
if (seriesModel.option.data[idx].value) {
|
|
24796
24799
|
seriesModel.option.data[idx].value = value.length === 1 ? value[0] : value;
|
|
24797
|
-
item[0] = ordinalMeta.parseAndCollect(
|
|
24800
|
+
item[0] = ordinalMeta.parseAndCollect(item[0]);
|
|
24798
24801
|
return {
|
|
24799
24802
|
...seriesModel.option.data[idx],
|
|
24800
24803
|
value: item
|
|
@@ -24802,7 +24805,7 @@ var ECharts = class extends Eventful_default {
|
|
|
24802
24805
|
} else {
|
|
24803
24806
|
seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
|
|
24804
24807
|
}
|
|
24805
|
-
item[0] = ordinalMeta.parseAndCollect(
|
|
24808
|
+
item[0] = ordinalMeta.parseAndCollect(item[0]);
|
|
24806
24809
|
return item;
|
|
24807
24810
|
})});
|
|
24808
24811
|
} else if (params.operation === "script") {
|
|
@@ -24810,12 +24813,12 @@ var ECharts = class extends Eventful_default {
|
|
|
24810
24813
|
} else {
|
|
24811
24814
|
const isCandletick = isCandle(seriesModel.subType) && !seriesModel.notAddOrdinal;
|
|
24812
24815
|
const formatData = map(params.data, (item) => {
|
|
24813
|
-
const idx =
|
|
24816
|
+
const idx = seriesDataIndex + 1;
|
|
24814
24817
|
if (isCandletick) {
|
|
24815
24818
|
const value = item.slice();
|
|
24816
24819
|
seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
|
|
24817
24820
|
}
|
|
24818
|
-
item[0] = ordinalMeta.parseAndCollect(
|
|
24821
|
+
item[0] = ordinalMeta.parseAndCollect(item[0]);
|
|
24819
24822
|
return item;
|
|
24820
24823
|
});
|
|
24821
24824
|
seriesModel.appendData({data: formatData});
|
|
@@ -40475,6 +40478,9 @@ var axisElementBuilders = {
|
|
|
40475
40478
|
return;
|
|
40476
40479
|
}
|
|
40477
40480
|
const splitLineModel = axisModel.getModel("splitLine");
|
|
40481
|
+
const axisLabelModel = axisModel.getModel("axisLabel");
|
|
40482
|
+
const hideMax = axisLabelModel.get("showMaxLabel") === false;
|
|
40483
|
+
const hideMin = axisLabelModel.get("showMinLabel") === false;
|
|
40478
40484
|
const lineStyleModel = splitLineModel.getModel("lineStyle");
|
|
40479
40485
|
const baseTickLineStyleModel = splitLineModel.getModel("baseTickLineStyle");
|
|
40480
40486
|
let lineColors = lineStyleModel.get("color");
|
|
@@ -40488,8 +40494,15 @@ var axisElementBuilders = {
|
|
|
40488
40494
|
const p1 = [];
|
|
40489
40495
|
const p2 = [];
|
|
40490
40496
|
const baseTickLineStyle = baseTickLineStyleModel.getLineStyle();
|
|
40497
|
+
const lastIndex = ticksCoords.length - 1;
|
|
40491
40498
|
const lineStyle = lineStyleModel.getLineStyle();
|
|
40492
40499
|
for (let i = 0; i < ticksCoords.length; i++) {
|
|
40500
|
+
if (lastIndex === i && hideMax) {
|
|
40501
|
+
continue;
|
|
40502
|
+
}
|
|
40503
|
+
if (i === 0 && hideMin) {
|
|
40504
|
+
continue;
|
|
40505
|
+
}
|
|
40493
40506
|
const tick = ticksCoords[i];
|
|
40494
40507
|
const tickCoord = axis.toGlobalCoord(tick.coord);
|
|
40495
40508
|
if (isHorizontal) {
|
|
@@ -71661,8 +71674,8 @@ BgRectModel.type = "bgRect";
|
|
|
71661
71674
|
BgRectModel.defaultOption = {
|
|
71662
71675
|
z: 2,
|
|
71663
71676
|
show: true,
|
|
71664
|
-
color: "rgb(
|
|
71665
|
-
bgColor: "rgba(
|
|
71677
|
+
color: "rgb(170, 130, 74)",
|
|
71678
|
+
bgColor: "rgba(170, 130, 74, 0.3)",
|
|
71666
71679
|
startIndex: 10
|
|
71667
71680
|
};
|
|
71668
71681
|
var BgRectView2 = class extends Component_default2 {
|
|
@@ -71721,6 +71734,67 @@ function install54(registers) {
|
|
|
71721
71734
|
registers.registerComponentView(BgRectView);
|
|
71722
71735
|
}
|
|
71723
71736
|
|
|
71737
|
+
// src/component/logo/install.ts
|
|
71738
|
+
var LogoModel2 = class extends Component_default {
|
|
71739
|
+
constructor() {
|
|
71740
|
+
super(...arguments);
|
|
71741
|
+
this.type = LogoModel2.type;
|
|
71742
|
+
this.layoutMode = {type: "box", ignoreSize: true};
|
|
71743
|
+
}
|
|
71744
|
+
};
|
|
71745
|
+
var LogoModel = LogoModel2;
|
|
71746
|
+
LogoModel.type = "logo";
|
|
71747
|
+
LogoModel.defaultOption = {
|
|
71748
|
+
z: 6,
|
|
71749
|
+
show: true,
|
|
71750
|
+
src: "",
|
|
71751
|
+
target: "blank",
|
|
71752
|
+
left: 0,
|
|
71753
|
+
top: 0,
|
|
71754
|
+
backgroundColor: "rgba(0,0,0,0)",
|
|
71755
|
+
padding: 5,
|
|
71756
|
+
itemGap: 10
|
|
71757
|
+
};
|
|
71758
|
+
var LogoView2 = class extends Component_default2 {
|
|
71759
|
+
constructor() {
|
|
71760
|
+
super(...arguments);
|
|
71761
|
+
this.type = LogoView2.type;
|
|
71762
|
+
}
|
|
71763
|
+
render(logoModel, ecModel, api2) {
|
|
71764
|
+
this.group.removeAll();
|
|
71765
|
+
if (!logoModel.get("show")) {
|
|
71766
|
+
return;
|
|
71767
|
+
}
|
|
71768
|
+
const group = this.group;
|
|
71769
|
+
const src = logoModel.get("src");
|
|
71770
|
+
const imageEl = new Image_default({
|
|
71771
|
+
style: {
|
|
71772
|
+
width: 160,
|
|
71773
|
+
height: 25,
|
|
71774
|
+
image: src,
|
|
71775
|
+
x: 20,
|
|
71776
|
+
y: api2.getHeight() - 50
|
|
71777
|
+
},
|
|
71778
|
+
z2: 10
|
|
71779
|
+
});
|
|
71780
|
+
const link = logoModel.get("link");
|
|
71781
|
+
const triggerEvent = logoModel.get("triggerEvent", true);
|
|
71782
|
+
imageEl.silent = !link && !triggerEvent;
|
|
71783
|
+
if (link) {
|
|
71784
|
+
imageEl.on("click", function() {
|
|
71785
|
+
windowOpen(link, "_" + logoModel.get("target"));
|
|
71786
|
+
});
|
|
71787
|
+
}
|
|
71788
|
+
group.add(imageEl);
|
|
71789
|
+
}
|
|
71790
|
+
};
|
|
71791
|
+
var LogoView = LogoView2;
|
|
71792
|
+
LogoView.type = "logo";
|
|
71793
|
+
function install55(registers) {
|
|
71794
|
+
registers.registerComponentModel(LogoModel);
|
|
71795
|
+
registers.registerComponentView(LogoView);
|
|
71796
|
+
}
|
|
71797
|
+
|
|
71724
71798
|
// src/component/timeline/TimelineModel.ts
|
|
71725
71799
|
var TimelineModel2 = class extends Component_default {
|
|
71726
71800
|
constructor() {
|
|
@@ -72570,7 +72644,7 @@ function has(obj, attr) {
|
|
|
72570
72644
|
}
|
|
72571
72645
|
|
|
72572
72646
|
// src/component/timeline/install.ts
|
|
72573
|
-
function
|
|
72647
|
+
function install56(registers) {
|
|
72574
72648
|
registers.registerComponentModel(SliderTimelineModel_default);
|
|
72575
72649
|
registers.registerComponentView(SliderTimelineView_default);
|
|
72576
72650
|
registers.registerSubTypeDefaulter("timeline", function() {
|
|
@@ -73011,7 +73085,7 @@ function createData(coordSys, seriesModel, mpModel) {
|
|
|
73011
73085
|
var MarkPointView_default = MarkPointView;
|
|
73012
73086
|
|
|
73013
73087
|
// src/component/marker/installMarkPoint.ts
|
|
73014
|
-
function
|
|
73088
|
+
function install57(registers) {
|
|
73015
73089
|
registers.registerComponentModel(MarkPointModel_default);
|
|
73016
73090
|
registers.registerComponentView(MarkPointView_default);
|
|
73017
73091
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -73329,7 +73403,7 @@ function createList2(coordSys, seriesModel, mlModel) {
|
|
|
73329
73403
|
var MarkLineView_default = MarkLineView;
|
|
73330
73404
|
|
|
73331
73405
|
// src/component/marker/installMarkLine.ts
|
|
73332
|
-
function
|
|
73406
|
+
function install58(registers) {
|
|
73333
73407
|
registers.registerComponentModel(MarkLineModel_default);
|
|
73334
73408
|
registers.registerComponentView(MarkLineView_default);
|
|
73335
73409
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -73643,7 +73717,7 @@ function createList3(coordSys, seriesModel, maModel) {
|
|
|
73643
73717
|
var MarkAreaView_default = MarkAreaView;
|
|
73644
73718
|
|
|
73645
73719
|
// src/component/marker/installMarkArea.ts
|
|
73646
|
-
function
|
|
73720
|
+
function install59(registers) {
|
|
73647
73721
|
registers.registerComponentModel(MarkAreaModel_default);
|
|
73648
73722
|
registers.registerComponentView(MarkAreaView_default);
|
|
73649
73723
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -74286,7 +74360,7 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
74286
74360
|
var MarkLabelView_default = MarkLabelView;
|
|
74287
74361
|
|
|
74288
74362
|
// src/component/marker/installMarkLabel.ts
|
|
74289
|
-
function
|
|
74363
|
+
function install60(registers) {
|
|
74290
74364
|
registers.registerComponentModel(MarkLabelModal_default);
|
|
74291
74365
|
registers.registerComponentView(MarkLabelView_default);
|
|
74292
74366
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -74968,7 +75042,7 @@ function installLegendAction(registers) {
|
|
|
74968
75042
|
}
|
|
74969
75043
|
|
|
74970
75044
|
// src/component/legend/installLegendPlain.ts
|
|
74971
|
-
function
|
|
75045
|
+
function install61(registers) {
|
|
74972
75046
|
registers.registerComponentModel(LegendModel_default);
|
|
74973
75047
|
registers.registerComponentView(LegendView_default);
|
|
74974
75048
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);
|
|
@@ -75298,17 +75372,17 @@ function installScrollableLegendAction(registers) {
|
|
|
75298
75372
|
}
|
|
75299
75373
|
|
|
75300
75374
|
// src/component/legend/installLegendScroll.ts
|
|
75301
|
-
function
|
|
75302
|
-
use(
|
|
75375
|
+
function install62(registers) {
|
|
75376
|
+
use(install61);
|
|
75303
75377
|
registers.registerComponentModel(ScrollableLegendModel_default);
|
|
75304
75378
|
registers.registerComponentView(ScrollableLegendView_default);
|
|
75305
75379
|
installScrollableLegendAction(registers);
|
|
75306
75380
|
}
|
|
75307
75381
|
|
|
75308
75382
|
// src/component/legend/install.ts
|
|
75309
|
-
function
|
|
75310
|
-
use(install60);
|
|
75383
|
+
function install63(registers) {
|
|
75311
75384
|
use(install61);
|
|
75385
|
+
use(install62);
|
|
75312
75386
|
}
|
|
75313
75387
|
|
|
75314
75388
|
// src/component/dataZoom/InsideZoomModel.ts
|
|
@@ -75737,7 +75811,7 @@ var getDirectionInfo = {
|
|
|
75737
75811
|
var InsideZoomView_default = InsideZoomView;
|
|
75738
75812
|
|
|
75739
75813
|
// src/component/dataZoom/installDataZoomInside.ts
|
|
75740
|
-
function
|
|
75814
|
+
function install64(registers) {
|
|
75741
75815
|
installCommon(registers);
|
|
75742
75816
|
registers.registerComponentModel(InsideZoomModel_default);
|
|
75743
75817
|
registers.registerComponentView(InsideZoomView_default);
|
|
@@ -76493,16 +76567,16 @@ function getCursor(orient) {
|
|
|
76493
76567
|
var SliderZoomView_default = SliderZoomView;
|
|
76494
76568
|
|
|
76495
76569
|
// src/component/dataZoom/installDataZoomSlider.ts
|
|
76496
|
-
function
|
|
76570
|
+
function install65(registers) {
|
|
76497
76571
|
registers.registerComponentModel(SliderZoomModel_default);
|
|
76498
76572
|
registers.registerComponentView(SliderZoomView_default);
|
|
76499
76573
|
installCommon(registers);
|
|
76500
76574
|
}
|
|
76501
76575
|
|
|
76502
76576
|
// src/component/dataZoom/install.ts
|
|
76503
|
-
function
|
|
76504
|
-
use(install63);
|
|
76577
|
+
function install66(registers) {
|
|
76505
76578
|
use(install64);
|
|
76579
|
+
use(install65);
|
|
76506
76580
|
}
|
|
76507
76581
|
|
|
76508
76582
|
// src/visual/visualDefault.ts
|
|
@@ -77767,7 +77841,7 @@ function installCommon2(registers) {
|
|
|
77767
77841
|
}
|
|
77768
77842
|
|
|
77769
77843
|
// src/component/visualMap/installVisualMapContinuous.ts
|
|
77770
|
-
function
|
|
77844
|
+
function install67(registers) {
|
|
77771
77845
|
registers.registerComponentModel(ContinuousModel_default);
|
|
77772
77846
|
registers.registerComponentView(ContinuousView_default);
|
|
77773
77847
|
installCommon2(registers);
|
|
@@ -78207,16 +78281,16 @@ PiecewiseVisualMapView.type = "visualMap.piecewise";
|
|
|
78207
78281
|
var PiecewiseView_default = PiecewiseVisualMapView;
|
|
78208
78282
|
|
|
78209
78283
|
// src/component/visualMap/installVisualMapPiecewise.ts
|
|
78210
|
-
function
|
|
78284
|
+
function install68(registers) {
|
|
78211
78285
|
registers.registerComponentModel(PiecewiseModel_default);
|
|
78212
78286
|
registers.registerComponentView(PiecewiseView_default);
|
|
78213
78287
|
installCommon2(registers);
|
|
78214
78288
|
}
|
|
78215
78289
|
|
|
78216
78290
|
// src/component/visualMap/install.ts
|
|
78217
|
-
function
|
|
78218
|
-
use(install66);
|
|
78291
|
+
function install69(registers) {
|
|
78219
78292
|
use(install67);
|
|
78293
|
+
use(install68);
|
|
78220
78294
|
}
|
|
78221
78295
|
|
|
78222
78296
|
// src/visual/aria.ts
|
|
@@ -78412,7 +78486,7 @@ function ariaPreprocessor(option) {
|
|
|
78412
78486
|
}
|
|
78413
78487
|
|
|
78414
78488
|
// src/component/aria/install.ts
|
|
78415
|
-
function
|
|
78489
|
+
function install70(registers) {
|
|
78416
78490
|
registers.registerPreprocessor(ariaPreprocessor);
|
|
78417
78491
|
registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);
|
|
78418
78492
|
}
|
|
@@ -78750,7 +78824,7 @@ var sortTransform = {
|
|
|
78750
78824
|
};
|
|
78751
78825
|
|
|
78752
78826
|
// src/component/transform/install.ts
|
|
78753
|
-
function
|
|
78827
|
+
function install71(registers) {
|
|
78754
78828
|
registers.registerTransform(filterTransform);
|
|
78755
78829
|
registers.registerTransform(sortTransform);
|
|
78756
78830
|
}
|
|
@@ -78788,7 +78862,7 @@ var DatasetView = class extends Component_default2 {
|
|
|
78788
78862
|
}
|
|
78789
78863
|
};
|
|
78790
78864
|
DatasetView.type = "dataset";
|
|
78791
|
-
function
|
|
78865
|
+
function install72(registers) {
|
|
78792
78866
|
registers.registerComponentModel(DatasetModel);
|
|
78793
78867
|
registers.registerComponentView(DatasetView);
|
|
78794
78868
|
}
|
|
@@ -80547,16 +80621,17 @@ use(install56);
|
|
|
80547
80621
|
use(install57);
|
|
80548
80622
|
use(install58);
|
|
80549
80623
|
use(install59);
|
|
80550
|
-
use(
|
|
80551
|
-
use(install65);
|
|
80624
|
+
use(install60);
|
|
80552
80625
|
use(install63);
|
|
80553
|
-
use(install64);
|
|
80554
|
-
use(install68);
|
|
80555
80626
|
use(install66);
|
|
80556
|
-
use(
|
|
80627
|
+
use(install64);
|
|
80628
|
+
use(install65);
|
|
80557
80629
|
use(install69);
|
|
80630
|
+
use(install67);
|
|
80631
|
+
use(install68);
|
|
80558
80632
|
use(install70);
|
|
80559
80633
|
use(install71);
|
|
80634
|
+
use(install72);
|
|
80560
80635
|
use(installUniversalTransition);
|
|
80561
80636
|
use(installLabelLayout);
|
|
80562
80637
|
|