@indfnd/common-mobile-pro 1.0.70 → 1.0.71
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.
|
@@ -178648,8 +178648,8 @@ var packages_common_table_component = (0,packages_componentNormalizer["default"]
|
|
|
178648
178648
|
|
|
178649
178649
|
/* harmony default export */ const packages_components_common_table = (packages_common_table);
|
|
178650
178650
|
|
|
178651
|
-
;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/components/data-chart/index.vue?vue&type=template&id=
|
|
178652
|
-
var
|
|
178651
|
+
;// ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/components/data-chart/index.vue?vue&type=template&id=56e77c6e
|
|
178652
|
+
var packages_data_chartvue_type_template_id_56e77c6e_render = function render() {
|
|
178653
178653
|
var _vm = this,
|
|
178654
178654
|
_c = _vm._self._c
|
|
178655
178655
|
return _c(
|
|
@@ -178673,11 +178673,11 @@ var packages_data_chartvue_type_template_id_675ff4b9_render = function render()
|
|
|
178673
178673
|
]
|
|
178674
178674
|
)
|
|
178675
178675
|
}
|
|
178676
|
-
var
|
|
178677
|
-
|
|
178676
|
+
var packages_data_chartvue_type_template_id_56e77c6e_staticRenderFns = []
|
|
178677
|
+
packages_data_chartvue_type_template_id_56e77c6e_render._withStripped = true
|
|
178678
178678
|
|
|
178679
178679
|
|
|
178680
|
-
;// ./packages/components/data-chart/index.vue?vue&type=template&id=
|
|
178680
|
+
;// ./packages/components/data-chart/index.vue?vue&type=template&id=56e77c6e
|
|
178681
178681
|
|
|
178682
178682
|
;// ./node_modules/echarts/node_modules/tslib/tslib.es6.js
|
|
178683
178683
|
/*! *****************************************************************************
|
|
@@ -285390,526 +285390,942 @@ packages_use(packages_installUniversalTransition);
|
|
|
285390
285390
|
// })
|
|
285391
285391
|
packages_use(packages_installLabelLayout);
|
|
285392
285392
|
;// ./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/components/data-chart/index.vue?vue&type=script&lang=js
|
|
285393
|
-
|
|
285394
|
-
|
|
285395
|
-
|
|
285396
|
-
|
|
285397
|
-
|
|
285398
|
-
|
|
285399
|
-
|
|
285400
|
-
|
|
285401
|
-
|
|
285402
|
-
|
|
285403
|
-
|
|
285404
|
-
|
|
285405
|
-
|
|
285406
|
-
|
|
285407
|
-
|
|
285408
|
-
|
|
285409
|
-
|
|
285410
|
-
},
|
|
285411
|
-
|
|
285412
|
-
|
|
285413
|
-
|
|
285414
|
-
|
|
285415
|
-
|
|
285416
|
-
|
|
285417
|
-
|
|
285418
|
-
|
|
285419
|
-
|
|
285420
|
-
|
|
285421
|
-
|
|
285422
|
-
|
|
285423
|
-
|
|
285424
|
-
|
|
285425
|
-
|
|
285426
|
-
|
|
285427
|
-
|
|
285428
|
-
|
|
285429
|
-
|
|
285430
|
-
|
|
285431
|
-
|
|
285432
|
-
|
|
285433
|
-
|
|
285434
|
-
|
|
285435
|
-
|
|
285436
|
-
|
|
285437
|
-
|
|
285438
|
-
|
|
285439
|
-
|
|
285440
|
-
|
|
285441
|
-
},
|
|
285442
|
-
|
|
285443
|
-
|
|
285444
|
-
|
|
285445
|
-
|
|
285446
|
-
|
|
285447
|
-
|
|
285448
|
-
|
|
285449
|
-
|
|
285450
|
-
|
|
285451
|
-
|
|
285452
|
-
|
|
285453
|
-
|
|
285454
|
-
|
|
285455
|
-
|
|
285456
|
-
|
|
285457
|
-
|
|
285458
|
-
|
|
285459
|
-
|
|
285460
|
-
|
|
285461
|
-
|
|
285462
|
-
|
|
285463
|
-
|
|
285464
|
-
|
|
285465
|
-
|
|
285466
|
-
|
|
285467
|
-
|
|
285468
|
-
|
|
285469
|
-
|
|
285470
|
-
|
|
285471
|
-
|
|
285472
|
-
|
|
285473
|
-
|
|
285474
|
-
|
|
285475
|
-
|
|
285476
|
-
|
|
285477
|
-
|
|
285478
|
-
|
|
285479
|
-
|
|
285480
|
-
|
|
285481
|
-
|
|
285482
|
-
|
|
285483
|
-
|
|
285484
|
-
|
|
285485
|
-
|
|
285486
|
-
|
|
285487
|
-
|
|
285488
|
-
|
|
285489
|
-
|
|
285490
|
-
|
|
285491
|
-
|
|
285492
|
-
|
|
285493
|
-
|
|
285494
|
-
|
|
285495
|
-
|
|
285496
|
-
|
|
285497
|
-
|
|
285498
|
-
|
|
285499
|
-
|
|
285500
|
-
|
|
285501
|
-
|
|
285502
|
-
|
|
285503
|
-
|
|
285504
|
-
|
|
285505
|
-
|
|
285506
|
-
|
|
285507
|
-
|
|
285508
|
-
|
|
285509
|
-
|
|
285510
|
-
|
|
285511
|
-
|
|
285512
|
-
|
|
285513
|
-
|
|
285514
|
-
|
|
285515
|
-
|
|
285516
|
-
|
|
285517
|
-
|
|
285518
|
-
|
|
285519
|
-
|
|
285520
|
-
|
|
285521
|
-
|
|
285522
|
-
|
|
285523
|
-
|
|
285524
|
-
|
|
285525
|
-
|
|
285526
|
-
|
|
285527
|
-
|
|
285528
|
-
|
|
285529
|
-
|
|
285530
|
-
|
|
285531
|
-
|
|
285532
|
-
|
|
285533
|
-
|
|
285534
|
-
|
|
285535
|
-
|
|
285536
|
-
|
|
285537
|
-
|
|
285538
|
-
|
|
285539
|
-
|
|
285540
|
-
|
|
285541
|
-
|
|
285542
|
-
|
|
285543
|
-
|
|
285544
|
-
|
|
285545
|
-
|
|
285546
|
-
|
|
285547
|
-
|
|
285548
|
-
|
|
285549
|
-
|
|
285550
|
-
|
|
285551
|
-
|
|
285552
|
-
|
|
285553
|
-
|
|
285554
|
-
|
|
285555
|
-
|
|
285556
|
-
|
|
285557
|
-
|
|
285558
|
-
|
|
285559
|
-
}
|
|
285560
|
-
|
|
285561
|
-
|
|
285562
|
-
|
|
285563
|
-
|
|
285564
|
-
|
|
285565
|
-
|
|
285566
|
-
|
|
285567
|
-
|
|
285568
|
-
|
|
285569
|
-
|
|
285570
|
-
|
|
285571
|
-
|
|
285572
|
-
|
|
285573
|
-
|
|
285574
|
-
|
|
285575
|
-
|
|
285576
|
-
|
|
285577
|
-
|
|
285578
|
-
|
|
285579
|
-
|
|
285580
|
-
|
|
285581
|
-
|
|
285582
|
-
|
|
285583
|
-
|
|
285584
|
-
|
|
285585
|
-
|
|
285586
|
-
|
|
285587
|
-
|
|
285588
|
-
|
|
285589
|
-
|
|
285590
|
-
|
|
285591
|
-
|
|
285592
|
-
|
|
285593
|
-
|
|
285594
|
-
|
|
285595
|
-
|
|
285596
|
-
|
|
285597
|
-
|
|
285598
|
-
|
|
285599
|
-
|
|
285600
|
-
|
|
285601
|
-
|
|
285602
|
-
|
|
285603
|
-
|
|
285604
|
-
|
|
285605
|
-
|
|
285606
|
-
|
|
285607
|
-
|
|
285608
|
-
|
|
285609
|
-
|
|
285610
|
-
|
|
285611
|
-
|
|
285612
|
-
|
|
285613
|
-
|
|
285614
|
-
|
|
285615
|
-
|
|
285616
|
-
|
|
285617
|
-
|
|
285618
|
-
|
|
285619
|
-
|
|
285620
|
-
|
|
285621
|
-
|
|
285622
|
-
]
|
|
285623
|
-
}
|
|
285624
|
-
|
|
285625
|
-
|
|
285626
|
-
|
|
285627
|
-
|
|
285628
|
-
|
|
285629
|
-
|
|
285630
|
-
|
|
285631
|
-
|
|
285632
|
-
|
|
285633
|
-
|
|
285634
|
-
|
|
285635
|
-
|
|
285636
|
-
|
|
285637
|
-
|
|
285638
|
-
|
|
285639
|
-
|
|
285640
|
-
|
|
285641
|
-
|
|
285642
|
-
|
|
285643
|
-
|
|
285644
|
-
|
|
285645
|
-
|
|
285646
|
-
|
|
285647
|
-
|
|
285648
|
-
|
|
285649
|
-
|
|
285650
|
-
|
|
285651
|
-
|
|
285652
|
-
|
|
285653
|
-
|
|
285654
|
-
|
|
285655
|
-
|
|
285656
|
-
|
|
285657
|
-
|
|
285658
|
-
|
|
285659
|
-
|
|
285660
|
-
|
|
285661
|
-
|
|
285662
|
-
|
|
285663
|
-
|
|
285664
|
-
|
|
285665
|
-
|
|
285666
|
-
|
|
285667
|
-
|
|
285668
|
-
|
|
285669
|
-
|
|
285670
|
-
|
|
285671
|
-
|
|
285672
|
-
|
|
285673
|
-
|
|
285674
|
-
|
|
285675
|
-
|
|
285676
|
-
|
|
285677
|
-
|
|
285678
|
-
|
|
285679
|
-
|
|
285680
|
-
|
|
285681
|
-
|
|
285682
|
-
|
|
285683
|
-
|
|
285684
|
-
|
|
285685
|
-
|
|
285686
|
-
|
|
285687
|
-
|
|
285688
|
-
|
|
285689
|
-
|
|
285690
|
-
|
|
285691
|
-
|
|
285692
|
-
|
|
285693
|
-
|
|
285694
|
-
|
|
285695
|
-
|
|
285696
|
-
|
|
285697
|
-
|
|
285698
|
-
|
|
285699
|
-
|
|
285700
|
-
|
|
285701
|
-
|
|
285702
|
-
|
|
285703
|
-
|
|
285704
|
-
|
|
285705
|
-
|
|
285706
|
-
|
|
285707
|
-
|
|
285708
|
-
|
|
285709
|
-
|
|
285710
|
-
|
|
285711
|
-
|
|
285712
|
-
|
|
285713
|
-
|
|
285714
|
-
|
|
285715
|
-
|
|
285716
|
-
|
|
285717
|
-
|
|
285718
|
-
|
|
285719
|
-
|
|
285720
|
-
|
|
285721
|
-
|
|
285722
|
-
|
|
285723
|
-
|
|
285724
|
-
|
|
285725
|
-
|
|
285726
|
-
|
|
285727
|
-
|
|
285728
|
-
|
|
285729
|
-
|
|
285730
|
-
|
|
285731
|
-
|
|
285732
|
-
|
|
285733
|
-
|
|
285734
|
-
|
|
285735
|
-
|
|
285736
|
-
|
|
285737
|
-
|
|
285738
|
-
|
|
285739
|
-
|
|
285740
|
-
|
|
285741
|
-
|
|
285742
|
-
|
|
285743
|
-
|
|
285744
|
-
|
|
285745
|
-
|
|
285746
|
-
|
|
285747
|
-
|
|
285748
|
-
|
|
285749
|
-
|
|
285750
|
-
|
|
285751
|
-
|
|
285752
|
-
|
|
285753
|
-
|
|
285754
|
-
|
|
285755
|
-
|
|
285756
|
-
|
|
285757
|
-
|
|
285758
|
-
|
|
285759
|
-
|
|
285760
|
-
|
|
285761
|
-
|
|
285762
|
-
|
|
285763
|
-
|
|
285764
|
-
|
|
285765
|
-
|
|
285766
|
-
|
|
285767
|
-
|
|
285768
|
-
|
|
285769
|
-
|
|
285770
|
-
|
|
285771
|
-
|
|
285772
|
-
|
|
285773
|
-
|
|
285774
|
-
|
|
285775
|
-
|
|
285776
|
-
|
|
285777
|
-
|
|
285778
|
-
|
|
285779
|
-
|
|
285780
|
-
|
|
285781
|
-
|
|
285782
|
-
|
|
285783
|
-
|
|
285784
|
-
|
|
285785
|
-
|
|
285786
|
-
|
|
285787
|
-
|
|
285788
|
-
|
|
285789
|
-
|
|
285790
|
-
|
|
285791
|
-
|
|
285792
|
-
|
|
285793
|
-
|
|
285794
|
-
|
|
285795
|
-
|
|
285796
|
-
|
|
285797
|
-
|
|
285798
|
-
|
|
285799
|
-
|
|
285800
|
-
|
|
285801
|
-
|
|
285802
|
-
|
|
285803
|
-
|
|
285804
|
-
|
|
285805
|
-
|
|
285806
|
-
|
|
285807
|
-
|
|
285808
|
-
|
|
285809
|
-
|
|
285810
|
-
|
|
285811
|
-
|
|
285812
|
-
|
|
285813
|
-
|
|
285814
|
-
|
|
285815
|
-
|
|
285816
|
-
|
|
285817
|
-
|
|
285818
|
-
|
|
285819
|
-
|
|
285820
|
-
|
|
285821
|
-
|
|
285822
|
-
|
|
285823
|
-
|
|
285824
|
-
|
|
285825
|
-
|
|
285826
|
-
|
|
285827
|
-
|
|
285828
|
-
|
|
285829
|
-
|
|
285830
|
-
|
|
285831
|
-
|
|
285832
|
-
}
|
|
285833
|
-
|
|
285834
|
-
|
|
285835
|
-
|
|
285836
|
-
|
|
285837
|
-
|
|
285838
|
-
|
|
285839
|
-
|
|
285840
|
-
|
|
285841
|
-
|
|
285842
|
-
|
|
285843
|
-
|
|
285844
|
-
|
|
285845
|
-
|
|
285846
|
-
|
|
285847
|
-
|
|
285848
|
-
|
|
285849
|
-
|
|
285850
|
-
|
|
285851
|
-
|
|
285852
|
-
|
|
285853
|
-
|
|
285854
|
-
|
|
285855
|
-
|
|
285856
|
-
|
|
285857
|
-
|
|
285858
|
-
|
|
285859
|
-
|
|
285860
|
-
|
|
285861
|
-
|
|
285862
|
-
|
|
285863
|
-
|
|
285864
|
-
|
|
285865
|
-
|
|
285866
|
-
|
|
285867
|
-
|
|
285868
|
-
|
|
285869
|
-
|
|
285870
|
-
|
|
285871
|
-
|
|
285872
|
-
|
|
285873
|
-
|
|
285874
|
-
|
|
285875
|
-
|
|
285876
|
-
|
|
285877
|
-
|
|
285878
|
-
|
|
285879
|
-
|
|
285880
|
-
|
|
285881
|
-
|
|
285882
|
-
|
|
285883
|
-
|
|
285884
|
-
|
|
285885
|
-
|
|
285886
|
-
|
|
285887
|
-
|
|
285888
|
-
|
|
285889
|
-
|
|
285890
|
-
|
|
285891
|
-
|
|
285892
|
-
|
|
285893
|
-
|
|
285894
|
-
|
|
285895
|
-
|
|
285896
|
-
|
|
285897
|
-
|
|
285898
|
-
|
|
285899
|
-
|
|
285900
|
-
|
|
285901
|
-
|
|
285902
|
-
|
|
285903
|
-
|
|
285904
|
-
|
|
285905
|
-
|
|
285906
|
-
|
|
285907
|
-
|
|
285908
|
-
|
|
285909
|
-
|
|
285910
|
-
|
|
285911
|
-
|
|
285912
|
-
}
|
|
285393
|
+
|
|
285394
|
+
|
|
285395
|
+
const packages_westeros = {
|
|
285396
|
+
color: [
|
|
285397
|
+
'rgb(184, 125, 57)',
|
|
285398
|
+
'rgb(59, 115, 205)',
|
|
285399
|
+
'rgb(13, 180, 38)',
|
|
285400
|
+
'rgb(241, 147, 0)',
|
|
285401
|
+
'#aa47bc',
|
|
285402
|
+
'#eb4165',
|
|
285403
|
+
'#80cbc4',
|
|
285404
|
+
],
|
|
285405
|
+
backgroundColor: '#fcf8ec',
|
|
285406
|
+
textStyle: {},
|
|
285407
|
+
title: {
|
|
285408
|
+
textStyle: {
|
|
285409
|
+
color: '#464646',
|
|
285410
|
+
},
|
|
285411
|
+
subtextStyle: {
|
|
285412
|
+
color: '#6E7079',
|
|
285413
|
+
},
|
|
285414
|
+
},
|
|
285415
|
+
line: {
|
|
285416
|
+
itemStyle: {
|
|
285417
|
+
borderWidth: 1,
|
|
285418
|
+
},
|
|
285419
|
+
lineStyle: {
|
|
285420
|
+
width: 2,
|
|
285421
|
+
},
|
|
285422
|
+
symbolSize: 4,
|
|
285423
|
+
symbol: 'emptyCircle',
|
|
285424
|
+
smooth: false,
|
|
285425
|
+
},
|
|
285426
|
+
radar: {
|
|
285427
|
+
itemStyle: {
|
|
285428
|
+
borderWidth: 1,
|
|
285429
|
+
},
|
|
285430
|
+
lineStyle: {
|
|
285431
|
+
width: 2,
|
|
285432
|
+
},
|
|
285433
|
+
symbolSize: 4,
|
|
285434
|
+
symbol: 'emptyCircle',
|
|
285435
|
+
smooth: false,
|
|
285436
|
+
},
|
|
285437
|
+
bar: {
|
|
285438
|
+
itemStyle: {
|
|
285439
|
+
barBorderWidth: 0,
|
|
285440
|
+
barBorderColor: 'rgba(0,0,0,0)',
|
|
285441
|
+
},
|
|
285442
|
+
barWidth: 15, // 柱子宽度
|
|
285443
|
+
barMaxWidth: 15, // 柱子最大宽度
|
|
285444
|
+
showBackground: false, //是否显示柱子背景(增强视觉层次)
|
|
285445
|
+
},
|
|
285446
|
+
pie: {
|
|
285447
|
+
itemStyle: {
|
|
285448
|
+
borderWidth: 0,
|
|
285449
|
+
borderColor: '#ccc',
|
|
285450
|
+
},
|
|
285451
|
+
},
|
|
285452
|
+
scatter: {
|
|
285453
|
+
itemStyle: {
|
|
285454
|
+
borderWidth: 0,
|
|
285455
|
+
borderColor: '#ccc',
|
|
285456
|
+
},
|
|
285457
|
+
},
|
|
285458
|
+
boxplot: {
|
|
285459
|
+
itemStyle: {
|
|
285460
|
+
borderWidth: 0,
|
|
285461
|
+
borderColor: '#ccc',
|
|
285462
|
+
},
|
|
285463
|
+
},
|
|
285464
|
+
parallel: {
|
|
285465
|
+
itemStyle: {
|
|
285466
|
+
borderWidth: 0,
|
|
285467
|
+
borderColor: '#ccc',
|
|
285468
|
+
},
|
|
285469
|
+
},
|
|
285470
|
+
sankey: {
|
|
285471
|
+
itemStyle: {
|
|
285472
|
+
borderWidth: 0,
|
|
285473
|
+
borderColor: '#ccc',
|
|
285474
|
+
},
|
|
285475
|
+
},
|
|
285476
|
+
funnel: {
|
|
285477
|
+
itemStyle: {
|
|
285478
|
+
borderWidth: 0,
|
|
285479
|
+
borderColor: '#ccc',
|
|
285480
|
+
},
|
|
285481
|
+
},
|
|
285482
|
+
gauge: {
|
|
285483
|
+
itemStyle: {
|
|
285484
|
+
borderWidth: 0,
|
|
285485
|
+
borderColor: '#ccc',
|
|
285486
|
+
},
|
|
285487
|
+
},
|
|
285488
|
+
candlestick: {
|
|
285489
|
+
itemStyle: {
|
|
285490
|
+
color: '#eb5454',
|
|
285491
|
+
color0: '#47b262',
|
|
285492
|
+
borderColor: '#eb5454',
|
|
285493
|
+
borderColor0: '#47b262',
|
|
285494
|
+
borderWidth: 1,
|
|
285495
|
+
},
|
|
285496
|
+
},
|
|
285497
|
+
graph: {
|
|
285498
|
+
itemStyle: {
|
|
285499
|
+
borderWidth: 0,
|
|
285500
|
+
borderColor: '#ccc',
|
|
285501
|
+
},
|
|
285502
|
+
lineStyle: {
|
|
285503
|
+
width: 1,
|
|
285504
|
+
color: '#aaa',
|
|
285505
|
+
},
|
|
285506
|
+
symbolSize: 4,
|
|
285507
|
+
symbol: 'emptyCircle',
|
|
285508
|
+
smooth: false,
|
|
285509
|
+
color: [
|
|
285510
|
+
'rgb(184, 125, 57)',
|
|
285511
|
+
'rgb(59, 115, 205)',
|
|
285512
|
+
'rgb(13, 180, 38)',
|
|
285513
|
+
'rgb(241, 147, 0)',
|
|
285514
|
+
'#aa47bc',
|
|
285515
|
+
'#eb4165',
|
|
285516
|
+
'#80cbc4',
|
|
285517
|
+
],
|
|
285518
|
+
label: {
|
|
285519
|
+
color: '#eee',
|
|
285520
|
+
},
|
|
285521
|
+
},
|
|
285522
|
+
map: {
|
|
285523
|
+
itemStyle: {
|
|
285524
|
+
areaColor: '#eee',
|
|
285525
|
+
borderColor: '#444',
|
|
285526
|
+
borderWidth: 0.5,
|
|
285527
|
+
},
|
|
285528
|
+
label: {
|
|
285529
|
+
color: '#000',
|
|
285530
|
+
},
|
|
285531
|
+
emphasis: {
|
|
285532
|
+
itemStyle: {
|
|
285533
|
+
areaColor: 'rgba(255,215,0,0.8)',
|
|
285534
|
+
borderColor: '#444',
|
|
285535
|
+
borderWidth: 1,
|
|
285536
|
+
},
|
|
285537
|
+
label: {
|
|
285538
|
+
color: 'rgb(100,0,0)',
|
|
285539
|
+
},
|
|
285540
|
+
},
|
|
285541
|
+
},
|
|
285542
|
+
geo: {
|
|
285543
|
+
itemStyle: {
|
|
285544
|
+
areaColor: '#eee',
|
|
285545
|
+
borderColor: '#444',
|
|
285546
|
+
borderWidth: 0.5,
|
|
285547
|
+
},
|
|
285548
|
+
label: {
|
|
285549
|
+
color: '#000',
|
|
285550
|
+
},
|
|
285551
|
+
emphasis: {
|
|
285552
|
+
itemStyle: {
|
|
285553
|
+
areaColor: 'rgba(255,215,0,0.8)',
|
|
285554
|
+
borderColor: '#444',
|
|
285555
|
+
borderWidth: 1,
|
|
285556
|
+
},
|
|
285557
|
+
label: {
|
|
285558
|
+
color: 'rgb(100,0,0)',
|
|
285559
|
+
},
|
|
285560
|
+
},
|
|
285561
|
+
},
|
|
285562
|
+
categoryAxis: {
|
|
285563
|
+
// 轴线
|
|
285564
|
+
axisLine: {
|
|
285565
|
+
show: true,
|
|
285566
|
+
lineStyle: {
|
|
285567
|
+
color: 'rgba(175, 108, 31,0.2)',
|
|
285568
|
+
},
|
|
285569
|
+
},
|
|
285570
|
+
axisTick: {
|
|
285571
|
+
show: true,
|
|
285572
|
+
lineStyle: {
|
|
285573
|
+
color: '#6E7079',
|
|
285574
|
+
},
|
|
285575
|
+
},
|
|
285576
|
+
// x轴文字
|
|
285577
|
+
axisLabel: {
|
|
285578
|
+
show: true,
|
|
285579
|
+
color: 'rgba(50, 39, 23, 0.4)',
|
|
285580
|
+
},
|
|
285581
|
+
// 图中线
|
|
285582
|
+
splitLine: {
|
|
285583
|
+
show: false,
|
|
285584
|
+
lineStyle: {
|
|
285585
|
+
color: ['#f1e7d5'],
|
|
285586
|
+
},
|
|
285587
|
+
},
|
|
285588
|
+
splitArea: {
|
|
285589
|
+
show: false,
|
|
285590
|
+
areaStyle: {
|
|
285591
|
+
color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
|
|
285592
|
+
},
|
|
285593
|
+
},
|
|
285594
|
+
},
|
|
285595
|
+
valueAxis: {
|
|
285596
|
+
axisLine: {
|
|
285597
|
+
show: false,
|
|
285598
|
+
lineStyle: {
|
|
285599
|
+
color: 'rgba(50, 39, 23, 0.4)',
|
|
285600
|
+
},
|
|
285601
|
+
},
|
|
285602
|
+
axisTick: {
|
|
285603
|
+
show: false,
|
|
285604
|
+
lineStyle: {
|
|
285605
|
+
color: '#6E7079',
|
|
285606
|
+
},
|
|
285607
|
+
},
|
|
285608
|
+
axisLabel: {
|
|
285609
|
+
show: true,
|
|
285610
|
+
color: 'rgba(50, 39, 23, 0.4)',
|
|
285611
|
+
},
|
|
285612
|
+
// 图中线
|
|
285613
|
+
splitLine: {
|
|
285614
|
+
show: true,
|
|
285615
|
+
lineStyle: {
|
|
285616
|
+
color: ['#f1e7d5'],
|
|
285617
|
+
},
|
|
285618
|
+
},
|
|
285619
|
+
splitArea: {
|
|
285620
|
+
show: false,
|
|
285621
|
+
areaStyle: {
|
|
285622
|
+
color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
|
|
285623
|
+
},
|
|
285624
|
+
},
|
|
285625
|
+
},
|
|
285626
|
+
logAxis: {
|
|
285627
|
+
axisLine: {
|
|
285628
|
+
show: false,
|
|
285629
|
+
lineStyle: {
|
|
285630
|
+
color: '#6E7079',
|
|
285631
|
+
},
|
|
285632
|
+
},
|
|
285633
|
+
axisTick: {
|
|
285634
|
+
show: false,
|
|
285635
|
+
lineStyle: {
|
|
285636
|
+
color: '#6E7079',
|
|
285637
|
+
},
|
|
285638
|
+
},
|
|
285639
|
+
axisLabel: {
|
|
285640
|
+
show: true,
|
|
285641
|
+
color: '#6E7079',
|
|
285642
|
+
},
|
|
285643
|
+
splitLine: {
|
|
285644
|
+
show: true,
|
|
285645
|
+
lineStyle: {
|
|
285646
|
+
color: ['#f1e7d5'],
|
|
285647
|
+
},
|
|
285648
|
+
},
|
|
285649
|
+
splitArea: {
|
|
285650
|
+
show: false,
|
|
285651
|
+
areaStyle: {
|
|
285652
|
+
color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
|
|
285653
|
+
},
|
|
285654
|
+
},
|
|
285655
|
+
},
|
|
285656
|
+
timeAxis: {
|
|
285657
|
+
axisLine: {
|
|
285658
|
+
show: true,
|
|
285659
|
+
lineStyle: {
|
|
285660
|
+
color: '#6E7079',
|
|
285661
|
+
},
|
|
285662
|
+
},
|
|
285663
|
+
axisTick: {
|
|
285664
|
+
show: true,
|
|
285665
|
+
lineStyle: {
|
|
285666
|
+
color: '#6E7079',
|
|
285667
|
+
},
|
|
285668
|
+
},
|
|
285669
|
+
axisLabel: {
|
|
285670
|
+
show: true,
|
|
285671
|
+
color: '#6E7079',
|
|
285672
|
+
},
|
|
285673
|
+
splitLine: {
|
|
285674
|
+
show: false,
|
|
285675
|
+
lineStyle: {
|
|
285676
|
+
color: ['#f1e7d5'],
|
|
285677
|
+
},
|
|
285678
|
+
},
|
|
285679
|
+
splitArea: {
|
|
285680
|
+
show: false,
|
|
285681
|
+
areaStyle: {
|
|
285682
|
+
color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
|
|
285683
|
+
},
|
|
285684
|
+
},
|
|
285685
|
+
},
|
|
285686
|
+
toolbox: {
|
|
285687
|
+
iconStyle: {
|
|
285688
|
+
borderColor: '#999',
|
|
285689
|
+
},
|
|
285690
|
+
emphasis: {
|
|
285691
|
+
iconStyle: {
|
|
285692
|
+
borderColor: '#666',
|
|
285693
|
+
},
|
|
285694
|
+
},
|
|
285695
|
+
},
|
|
285696
|
+
legend: {
|
|
285697
|
+
textStyle: {
|
|
285698
|
+
color: '#333',
|
|
285699
|
+
},
|
|
285700
|
+
left: 'center',
|
|
285701
|
+
right: 'auto',
|
|
285702
|
+
top: 0,
|
|
285703
|
+
bottom: 10,
|
|
285704
|
+
},
|
|
285705
|
+
tooltip: {
|
|
285706
|
+
axisPointer: {
|
|
285707
|
+
lineStyle: {
|
|
285708
|
+
color: '#ccc',
|
|
285709
|
+
width: 1,
|
|
285710
|
+
},
|
|
285711
|
+
crossStyle: {
|
|
285712
|
+
color: '#ccc',
|
|
285713
|
+
width: 1,
|
|
285714
|
+
},
|
|
285715
|
+
},
|
|
285716
|
+
},
|
|
285717
|
+
timeline: {
|
|
285718
|
+
lineStyle: {
|
|
285719
|
+
color: '#DAE1F5',
|
|
285720
|
+
width: 2,
|
|
285721
|
+
},
|
|
285722
|
+
itemStyle: {
|
|
285723
|
+
color: '#A4B1D7',
|
|
285724
|
+
borderWidth: 1,
|
|
285725
|
+
},
|
|
285726
|
+
controlStyle: {
|
|
285727
|
+
color: '#A4B1D7',
|
|
285728
|
+
borderColor: '#A4B1D7',
|
|
285729
|
+
borderWidth: 1,
|
|
285730
|
+
},
|
|
285731
|
+
checkpointStyle: {
|
|
285732
|
+
color: '#316bf3',
|
|
285733
|
+
borderColor: '#fff',
|
|
285734
|
+
},
|
|
285735
|
+
label: {
|
|
285736
|
+
color: '#A4B1D7',
|
|
285737
|
+
},
|
|
285738
|
+
emphasis: {
|
|
285739
|
+
itemStyle: {
|
|
285740
|
+
color: '#FFF',
|
|
285741
|
+
},
|
|
285742
|
+
controlStyle: {
|
|
285743
|
+
color: '#A4B1D7',
|
|
285744
|
+
borderColor: '#A4B1D7',
|
|
285745
|
+
borderWidth: 1,
|
|
285746
|
+
},
|
|
285747
|
+
label: {
|
|
285748
|
+
color: '#A4B1D7',
|
|
285749
|
+
},
|
|
285750
|
+
},
|
|
285751
|
+
},
|
|
285752
|
+
visualMap: {
|
|
285753
|
+
color: ['rgb(184, 125, 57)', 'rgb(248, 248, 236)'],
|
|
285754
|
+
},
|
|
285755
|
+
markPoint: {
|
|
285756
|
+
label: {
|
|
285757
|
+
color: '#eee',
|
|
285758
|
+
},
|
|
285759
|
+
emphasis: {
|
|
285760
|
+
label: {
|
|
285761
|
+
color: '#eee',
|
|
285762
|
+
},
|
|
285763
|
+
},
|
|
285764
|
+
},
|
|
285765
|
+
}
|
|
285766
|
+
/* harmony default export */ const packages_data_chartvue_type_script_lang_js = ({
|
|
285767
|
+
props: {
|
|
285768
|
+
datas: {
|
|
285769
|
+
type: Object,
|
|
285770
|
+
default: () => {},
|
|
285771
|
+
},
|
|
285772
|
+
},
|
|
285773
|
+
watch: {
|
|
285774
|
+
datas: {
|
|
285775
|
+
deep: true,
|
|
285776
|
+
immediate: true,
|
|
285777
|
+
handler() {
|
|
285778
|
+
this.updateChart()
|
|
285779
|
+
},
|
|
285780
|
+
},
|
|
285781
|
+
},
|
|
285782
|
+
data() {
|
|
285783
|
+
return {
|
|
285784
|
+
chart: null,
|
|
285785
|
+
resizeObserver: null,
|
|
285786
|
+
}
|
|
285787
|
+
},
|
|
285788
|
+
computed: {
|
|
285789
|
+
getGrid() {
|
|
285790
|
+
return {
|
|
285791
|
+
top: this.datas.grid?.top || '20%', // 距离容器顶部的距离
|
|
285792
|
+
left: this.datas.grid?.left || '8%', // 距离容器左侧的距离
|
|
285793
|
+
right: this.datas.grid?.right || '8%', // 距离容器右侧的距离
|
|
285794
|
+
bottom: this.datas.grid?.bottom || '0%', // 距离容器底部的距离
|
|
285795
|
+
containLabel: true, // 自动包含坐标轴的标签区域,以防止标签被裁剪
|
|
285796
|
+
}
|
|
285797
|
+
},
|
|
285798
|
+
getTitle() {
|
|
285799
|
+
const { title } = this.datas
|
|
285800
|
+
return typeof title === 'string'
|
|
285801
|
+
? {
|
|
285802
|
+
left: '2%', // 距离左侧2%
|
|
285803
|
+
top: '2%', // 距离顶部2%
|
|
285804
|
+
text: title,
|
|
285805
|
+
}
|
|
285806
|
+
: {
|
|
285807
|
+
left: '2%', // 距离左侧2%
|
|
285808
|
+
top: '2%', // 距离顶部2%
|
|
285809
|
+
...title,
|
|
285810
|
+
}
|
|
285811
|
+
},
|
|
285812
|
+
getYaxis() {
|
|
285813
|
+
if (!this.datas.yAxis) return []
|
|
285814
|
+
// Y轴传递的为数组
|
|
285815
|
+
if (Array.isArray(this.datas.yAxis)) {
|
|
285816
|
+
return this.datas.yAxis.length === 1
|
|
285817
|
+
? this.formatSingleYAxis(this.datas.yAxis[0])
|
|
285818
|
+
: this.formatMultipleYAxis(this.datas.yAxis)
|
|
285819
|
+
}
|
|
285820
|
+
// Y轴传递的为对象
|
|
285821
|
+
return typeof this.datas.yAxis === 'object' ? this.formatYAxis(this.datas.yAxis) : {}
|
|
285822
|
+
},
|
|
285823
|
+
getXaxis() {
|
|
285824
|
+
if (!this.datas.xAxis) return []
|
|
285825
|
+
// 对象就是单X轴
|
|
285826
|
+
if (typeof this.datas.xAxis === 'object' && !Array.isArray(this.datas.xAxis)) {
|
|
285827
|
+
return this.formatXAxis(this.datas.xAxis)
|
|
285828
|
+
} else if (Array.isArray(this.datas.xAxis)) {
|
|
285829
|
+
return this.datas.xAxis.length === 1
|
|
285830
|
+
? this.formatSingleXAxis(this.datas.xAxis[0])
|
|
285831
|
+
: this.formatMultipleXAxis(this.datas.xAxis)
|
|
285832
|
+
}
|
|
285833
|
+
return []
|
|
285834
|
+
},
|
|
285835
|
+
getTooltip() {
|
|
285836
|
+
return this.datas.series.map((data) => {
|
|
285837
|
+
if (data.type === 'scatter' || data.type === 'pie') {
|
|
285838
|
+
return {
|
|
285839
|
+
trigger: 'item',
|
|
285840
|
+
}
|
|
285841
|
+
} else {
|
|
285842
|
+
return {
|
|
285843
|
+
trigger: 'axis',
|
|
285844
|
+
}
|
|
285845
|
+
}
|
|
285846
|
+
})
|
|
285847
|
+
},
|
|
285848
|
+
getSeries() {
|
|
285849
|
+
return this.datas.series.map((data, index) => {
|
|
285850
|
+
if (data.type === 'pie') {
|
|
285851
|
+
return {
|
|
285852
|
+
...data,
|
|
285853
|
+
center: [`${data.center ? data.center : 50}%`, '52%'],
|
|
285854
|
+
label: {
|
|
285855
|
+
show: true,
|
|
285856
|
+
position: data.label,
|
|
285857
|
+
},
|
|
285858
|
+
data: data.data.map((item) => ({
|
|
285859
|
+
...item,
|
|
285860
|
+
})),
|
|
285861
|
+
}
|
|
285862
|
+
} else if (data.type === 'bar') {
|
|
285863
|
+
const topRgb = packages_westeros.color[index]
|
|
285864
|
+
const topColor = this.rgbToRgba(topRgb, 1)
|
|
285865
|
+
const midColor = this.rgbToRgba(topRgb, 0.8)
|
|
285866
|
+
const botColor = this.rgbToRgba(topRgb, 0.2)
|
|
285867
|
+
return {
|
|
285868
|
+
...data,
|
|
285869
|
+
itemStyle: {
|
|
285870
|
+
borderRadius: data.smooth ? [4, 4, 0, 0] : [0, 0, 0, 0],
|
|
285871
|
+
color: new packages_graphic_LinearGradient(0, 0, 0, 1, [
|
|
285872
|
+
{ offset: 0, color: topColor }, // 底部更透明
|
|
285873
|
+
{ offset: 0.5, color: midColor }, // 中间过渡
|
|
285874
|
+
{ offset: 1, color: botColor }, // 顶部不透明
|
|
285875
|
+
]),
|
|
285876
|
+
},
|
|
285877
|
+
emphasis: {
|
|
285878
|
+
focus: 'series',
|
|
285879
|
+
},
|
|
285880
|
+
}
|
|
285881
|
+
} else if (data.type === 'line') {
|
|
285882
|
+
const topRgb = packages_westeros.color[index]
|
|
285883
|
+
const topColor = this.rgbToRgba(topRgb, 0.6)
|
|
285884
|
+
return {
|
|
285885
|
+
...data,
|
|
285886
|
+
smooth: data.smooth,
|
|
285887
|
+
label: {
|
|
285888
|
+
show: false,
|
|
285889
|
+
position: 'top',
|
|
285890
|
+
formatter: '{c} units',
|
|
285891
|
+
},
|
|
285892
|
+
itemStyle: {
|
|
285893
|
+
color: topColor,
|
|
285894
|
+
},
|
|
285895
|
+
areaStyle: data.disAreaStyle
|
|
285896
|
+
? {
|
|
285897
|
+
color: new packages_graphic_LinearGradient(0, 0, 0, 1, [
|
|
285898
|
+
{ offset: 0, color: topColor },
|
|
285899
|
+
{ offset: 0.6, color: 'rgba(178, 112, 37, 0)' },
|
|
285900
|
+
{ offset: 1, color: 'rgba(178, 112, 37, 0)' },
|
|
285901
|
+
]),
|
|
285902
|
+
}
|
|
285903
|
+
: {
|
|
285904
|
+
color: new packages_graphic_LinearGradient(0, 0, 0, 1, [
|
|
285905
|
+
{ offset: 0, color: 'rgba(178, 112, 37, 0)' },
|
|
285906
|
+
{ offset: 1, color: 'rgba(178, 112, 37, 0)' },
|
|
285907
|
+
]),
|
|
285908
|
+
},
|
|
285909
|
+
emphasis: {
|
|
285910
|
+
focus: 'series',
|
|
285911
|
+
},
|
|
285912
|
+
}
|
|
285913
|
+
} else if (data.type === 'scatter') {
|
|
285914
|
+
return {
|
|
285915
|
+
...data,
|
|
285916
|
+
symbol: 'rect', // 点的形状设置为带圆角的矩形
|
|
285917
|
+
symbolSize: (data, params) => {
|
|
285918
|
+
const name = params?.data?.name || '' // 检查 name 是否存在,若不存在则赋值为空字符串
|
|
285919
|
+
const textLength = name.length // 获取字符长度
|
|
285920
|
+
const width = Math.max(40, textLength * 15) // 每个字符15px,最小宽度为40px
|
|
285921
|
+
const height = 25 // 高度固定为25px
|
|
285922
|
+
return [width, height]
|
|
285923
|
+
},
|
|
285924
|
+
tooltip: {
|
|
285925
|
+
show: true,
|
|
285926
|
+
formatter: (params) => {
|
|
285927
|
+
const xValue = params?.data?.value?.[0] ?? 'N/A' // 如果 X 值不存在,显示 "N/A"
|
|
285928
|
+
const yValue = params?.data?.value?.[1] ?? 'N/A' // 如果 Y 值不存在,显示 "N/A"
|
|
285929
|
+
return `X: ${xValue}, Y: ${yValue}` // 提示框的格式
|
|
285930
|
+
},
|
|
285931
|
+
},
|
|
285932
|
+
label: {
|
|
285933
|
+
show: true, // 显示文字标签
|
|
285934
|
+
formatter: (params) => {
|
|
285935
|
+
const name = params?.data?.name || 'Unknown' // 当 name 不存在时使用 "Unknown"
|
|
285936
|
+
return `${name}`
|
|
285937
|
+
},
|
|
285938
|
+
position: 'inside', // 文字显示在矩形内部
|
|
285939
|
+
fontSize: 12, // 文字大小
|
|
285940
|
+
align: 'center', // 文字居中对齐
|
|
285941
|
+
verticalAlign: 'middle', // 文字垂直居中对齐
|
|
285942
|
+
},
|
|
285943
|
+
}
|
|
285944
|
+
}
|
|
285945
|
+
})
|
|
285946
|
+
},
|
|
285947
|
+
getLegend() {
|
|
285948
|
+
const showLegend = this.datas?.showLegend?.[0] ?? true
|
|
285949
|
+
if (!showLegend) {
|
|
285950
|
+
return null
|
|
285951
|
+
}
|
|
285952
|
+
if (!this.datas.legend)
|
|
285953
|
+
return {
|
|
285954
|
+
orient: this.datas?.showLegend?.[1] || 'horizontal',
|
|
285955
|
+
top: '2%',
|
|
285956
|
+
right: '2%',
|
|
285957
|
+
}
|
|
285958
|
+
// Y轴传递的为数组
|
|
285959
|
+
if (Array.isArray(this.datas.legend)) {
|
|
285960
|
+
return this.datas.yAxis.length === 1
|
|
285961
|
+
? this.formatLegend(this.datas.legend[0])
|
|
285962
|
+
: this.formatMultipleLegend(this.datas.legend)
|
|
285963
|
+
}
|
|
285964
|
+
// Y轴传递的为对象
|
|
285965
|
+
return typeof this.datas.legend === 'object' ? this.formatLegend(this.datas.legend) : {}
|
|
285966
|
+
},
|
|
285967
|
+
getGraphic() {
|
|
285968
|
+
if (this.datas.graphic) {
|
|
285969
|
+
return [
|
|
285970
|
+
// 第一象限背景色和文字
|
|
285971
|
+
{
|
|
285972
|
+
type: 'text',
|
|
285973
|
+
left: '32%',
|
|
285974
|
+
top: '32%',
|
|
285975
|
+
style: {
|
|
285976
|
+
text: this.datas.graphic[0],
|
|
285977
|
+
fill: '#ddd', // 标签文字颜色,
|
|
285978
|
+
font: 'bold 16px sans-serif',
|
|
285979
|
+
},
|
|
285980
|
+
},
|
|
285981
|
+
// 第二象限背景色和文字
|
|
285982
|
+
{
|
|
285983
|
+
type: 'text',
|
|
285984
|
+
left: '70%',
|
|
285985
|
+
top: '32%',
|
|
285986
|
+
style: {
|
|
285987
|
+
text: this.datas.graphic[1],
|
|
285988
|
+
fill: '#ddd', // 标签文字颜色,
|
|
285989
|
+
font: 'bold 16px sans-serif',
|
|
285990
|
+
},
|
|
285991
|
+
},
|
|
285992
|
+
// 第三象限背景色和文字
|
|
285993
|
+
{
|
|
285994
|
+
type: 'text',
|
|
285995
|
+
left: '70%',
|
|
285996
|
+
top: '58%',
|
|
285997
|
+
style: {
|
|
285998
|
+
text: this.datas.graphic[3],
|
|
285999
|
+
fill: '#ddd', // 标签文字颜色,
|
|
286000
|
+
font: 'bold 16px sans-serif',
|
|
286001
|
+
},
|
|
286002
|
+
},
|
|
286003
|
+
// 第四象限背景色和文字
|
|
286004
|
+
{
|
|
286005
|
+
type: 'text',
|
|
286006
|
+
left: '32%',
|
|
286007
|
+
top: '58%',
|
|
286008
|
+
style: {
|
|
286009
|
+
text: this.datas.graphic[2],
|
|
286010
|
+
fill: '#ddd', // 标签文字颜色,
|
|
286011
|
+
font: 'bold 16px sans-serif',
|
|
286012
|
+
},
|
|
286013
|
+
},
|
|
286014
|
+
]
|
|
286015
|
+
} else {
|
|
286016
|
+
return []
|
|
286017
|
+
}
|
|
286018
|
+
},
|
|
286019
|
+
getDataZoom() {
|
|
286020
|
+
return this.datas.dataZoom
|
|
286021
|
+
},
|
|
286022
|
+
},
|
|
286023
|
+
mounted() {
|
|
286024
|
+
this.initchart()
|
|
286025
|
+
this.initResizeObserver()
|
|
286026
|
+
},
|
|
286027
|
+
beforeDestroy() {
|
|
286028
|
+
this.cleanupResizeObserver()
|
|
286029
|
+
this.disposeChart()
|
|
286030
|
+
},
|
|
286031
|
+
methods: {
|
|
286032
|
+
rgbToRgba(rgbStr, alpha = 1) {
|
|
286033
|
+
const match = rgbStr.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/)
|
|
286034
|
+
if (match) {
|
|
286035
|
+
const [, r, g, b] = match
|
|
286036
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`
|
|
286037
|
+
}
|
|
286038
|
+
return rgbStr // 如果格式不对就返回原值
|
|
286039
|
+
},
|
|
286040
|
+
formatMultipleLegend(legends) {
|
|
286041
|
+
return legends.map((legend) => ({
|
|
286042
|
+
...legend,
|
|
286043
|
+
orient: legend.orient || 'horizontal', // 默认方向为水平
|
|
286044
|
+
textStyle: {
|
|
286045
|
+
...(legend.textStyle || {}), // 合并用户传入的 textStyle 配置
|
|
286046
|
+
},
|
|
286047
|
+
}))
|
|
286048
|
+
},
|
|
286049
|
+
formatLegend(legend) {
|
|
286050
|
+
return {
|
|
286051
|
+
...legend,
|
|
286052
|
+
orient: legend.orient || 'horizontal', // 默认方向为水平
|
|
286053
|
+
textStyle: {
|
|
286054
|
+
...(legend.textStyle || {}), // 合并用户传入的 textStyle 配置
|
|
286055
|
+
},
|
|
286056
|
+
}
|
|
286057
|
+
},
|
|
286058
|
+
disposeChart() {
|
|
286059
|
+
if (this.chart) {
|
|
286060
|
+
this.chart.dispose()
|
|
286061
|
+
this.chart = null
|
|
286062
|
+
}
|
|
286063
|
+
},
|
|
286064
|
+
initResizeObserver() {
|
|
286065
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
286066
|
+
if (this.chart) this.chart.resize()
|
|
286067
|
+
})
|
|
286068
|
+
this.resizeObserver.observe(this.$refs.main)
|
|
286069
|
+
},
|
|
286070
|
+
cleanupResizeObserver() {
|
|
286071
|
+
if (this.resizeObserver) {
|
|
286072
|
+
this.resizeObserver.disconnect()
|
|
286073
|
+
this.resizeObserver = null
|
|
286074
|
+
}
|
|
286075
|
+
},
|
|
286076
|
+
updateChart() {
|
|
286077
|
+
if (!this.chart) {
|
|
286078
|
+
return
|
|
286079
|
+
}
|
|
286080
|
+
this.initchart()
|
|
286081
|
+
},
|
|
286082
|
+
// 对象时的配置
|
|
286083
|
+
formatYAxis(yAxis) {
|
|
286084
|
+
// 获取数据时增加默认值和防御性检查
|
|
286085
|
+
const seriesData = this.datas?.series || [] // 如果 this.datas 或 series 是 undefined,使用空数组作为默认值
|
|
286086
|
+
const result = seriesData
|
|
286087
|
+
.flatMap((item) => item.data.map((innerItem) => innerItem.value[1]))
|
|
286088
|
+
.filter(
|
|
286089
|
+
(value) =>
|
|
286090
|
+
value !== null &&
|
|
286091
|
+
value !== undefined && // 排除 null 和 undefined
|
|
286092
|
+
!isNaN(Number(value)) &&
|
|
286093
|
+
isFinite(Number(value)), // 检查是否是有效数值(包括字符串形式的纯数字)
|
|
286094
|
+
)
|
|
286095
|
+
const maxAbsoluteValue = Math.max(...result.map((value) => Math.abs(value)))
|
|
286096
|
+
|
|
286097
|
+
// 动态设置 y 轴配置
|
|
286098
|
+
return {
|
|
286099
|
+
...yAxis,
|
|
286100
|
+
...{
|
|
286101
|
+
min: -maxAbsoluteValue,
|
|
286102
|
+
max: maxAbsoluteValue,
|
|
286103
|
+
interval: Math.ceil(maxAbsoluteValue / 5),
|
|
286104
|
+
}, // 仅在正负都有时设置 min 和 max
|
|
286105
|
+
nameGap: 20, // 控制与轴线的距离
|
|
286106
|
+
axisLabel: {
|
|
286107
|
+
formatter: yAxis.formatter,
|
|
286108
|
+
},
|
|
286109
|
+
nameTextStyle: {
|
|
286110
|
+
padding: yAxis.padding || null,
|
|
286111
|
+
},
|
|
286112
|
+
splitLine: {
|
|
286113
|
+
show: true, // 显示背景线
|
|
286114
|
+
},
|
|
286115
|
+
}
|
|
286116
|
+
},
|
|
286117
|
+
// 对象时的配置
|
|
286118
|
+
formatXAxis(xAxis) {
|
|
286119
|
+
// 获取数据时增加默认值和防御性检查
|
|
286120
|
+
const seriesData = this.datas?.series || [] // 如果 this.datas 或 series 是 undefined,使用空数组作为默认值
|
|
286121
|
+
const result = seriesData
|
|
286122
|
+
.flatMap((item) => item.data.map((innerItem) => innerItem.value[0]))
|
|
286123
|
+
.filter(
|
|
286124
|
+
(value) =>
|
|
286125
|
+
value !== null &&
|
|
286126
|
+
value !== undefined && // 排除 null 和 undefined
|
|
286127
|
+
!isNaN(Number(value)) &&
|
|
286128
|
+
isFinite(Number(value)), // 检查是否是有效数值(包括字符串形式的纯数字)
|
|
286129
|
+
)
|
|
286130
|
+
const maxAbsoluteValue = Math.max(...result.map((value) => Math.abs(value)))
|
|
286131
|
+
// 返回带有动态配置的X轴配置
|
|
286132
|
+
return {
|
|
286133
|
+
...xAxis, // 保留原有的xAxis配置
|
|
286134
|
+
...{
|
|
286135
|
+
min: -maxAbsoluteValue,
|
|
286136
|
+
max: maxAbsoluteValue,
|
|
286137
|
+
interval: Math.ceil(maxAbsoluteValue / 5),
|
|
286138
|
+
}, // 仅在正负都有时设置 min 和 max
|
|
286139
|
+
nameRotate: 0, // 将名称旋转90度
|
|
286140
|
+
nameGap: 20, // 控制与轴线的距离
|
|
286141
|
+
nameTextStyle: {
|
|
286142
|
+
padding: xAxis.padding || null,
|
|
286143
|
+
},
|
|
286144
|
+
axisLabel: {
|
|
286145
|
+
formatter: xAxis.formatter,
|
|
286146
|
+
},
|
|
286147
|
+
splitLine: {
|
|
286148
|
+
show: true, // 显示背景线
|
|
286149
|
+
},
|
|
286150
|
+
}
|
|
286151
|
+
},
|
|
286152
|
+
// 数组单Y轴的配置
|
|
286153
|
+
formatSingleYAxis(yAxis) {
|
|
286154
|
+
// 获取所有 yAxisIndex 为 0 的系列数据(左侧 Y 轴)
|
|
286155
|
+
const YAxisData = this.datas.series.flatMap((serie) => serie.data)
|
|
286156
|
+
const ret = this.calculateAxisRange(YAxisData)
|
|
286157
|
+
return {
|
|
286158
|
+
...yAxis,
|
|
286159
|
+
nameLocation: 'end',
|
|
286160
|
+
boundaryGap: yAxis.type === 'category' ? true : [0, 0.01],
|
|
286161
|
+
nameTextStyle: {
|
|
286162
|
+
padding: yAxis.padding || null,
|
|
286163
|
+
},
|
|
286164
|
+
axisLabel: {
|
|
286165
|
+
formatter: yAxis.formatter,
|
|
286166
|
+
},
|
|
286167
|
+
min: ret.min,
|
|
286168
|
+
max: ret.max,
|
|
286169
|
+
interval: ret.interval,
|
|
286170
|
+
splitLine: {
|
|
286171
|
+
show: true, // 显示背景线
|
|
286172
|
+
lineStyle: {
|
|
286173
|
+
width: 1, // 背景线宽度
|
|
286174
|
+
type: 'dashed', // 背景线类型,可选:'solid', 'dashed', 'dotted'
|
|
286175
|
+
},
|
|
286176
|
+
},
|
|
286177
|
+
}
|
|
286178
|
+
},
|
|
286179
|
+
// 数组单X轴的配置
|
|
286180
|
+
formatSingleXAxis(xAxis) {
|
|
286181
|
+
return {
|
|
286182
|
+
...xAxis,
|
|
286183
|
+
boundaryGap: xAxis.type === 'category' ? true : [0, 0.01],
|
|
286184
|
+
nameLocation: 'end',
|
|
286185
|
+
nameTextStyle: {
|
|
286186
|
+
padding: [0, 45, 0, 0],
|
|
286187
|
+
},
|
|
286188
|
+
axisLabel: {
|
|
286189
|
+
formatter: xAxis.formatter,
|
|
286190
|
+
rotate: xAxis.rotate, // 设置倾斜角度
|
|
286191
|
+
},
|
|
286192
|
+
scale: true,
|
|
286193
|
+
axisLine: { onZero: true },
|
|
286194
|
+
axisTick: {
|
|
286195
|
+
// 刻度样式
|
|
286196
|
+
show: false,
|
|
286197
|
+
alignWithLabel: true, // 刻度与标签对齐
|
|
286198
|
+
length: 5, // 刻度线长度
|
|
286199
|
+
},
|
|
286200
|
+
splitLine: {
|
|
286201
|
+
show: false, // 显示背景线
|
|
286202
|
+
lineStyle: {
|
|
286203
|
+
width: 1, // 背景线宽度
|
|
286204
|
+
type: 'dashed', // 背景线类型,可选:'solid', 'dashed', 'dotted'
|
|
286205
|
+
},
|
|
286206
|
+
},
|
|
286207
|
+
}
|
|
286208
|
+
},
|
|
286209
|
+
// 数组多Y轴的配置
|
|
286210
|
+
formatMultipleYAxis(yAxis) {
|
|
286211
|
+
// 获取所有 yAxisIndex 为 0 的系列数据(左侧 Y 轴)
|
|
286212
|
+
const leftYAxisData = this.datas.series
|
|
286213
|
+
.filter((serie) => serie.yAxisIndex === 0)
|
|
286214
|
+
.flatMap((serie) => serie.data)
|
|
286215
|
+
const ret1 = this.calculateAxisRange(leftYAxisData)
|
|
286216
|
+
// 获取所有 yAxisIndex 为 1 的系列数据(右侧 Y 轴)
|
|
286217
|
+
const rightYAxisData = this.datas.series
|
|
286218
|
+
.filter((serie) => serie.yAxisIndex === 1)
|
|
286219
|
+
.flatMap((serie) => serie.data)
|
|
286220
|
+
const ret2 = this.calculateAxisRange(rightYAxisData)
|
|
286221
|
+
return yAxis.map((yAxisItem) => {
|
|
286222
|
+
return {
|
|
286223
|
+
...yAxisItem, // 正确地将对象解构放入返回的对象中
|
|
286224
|
+
min: yAxisItem.yAxisIndex === 0 ? ret1.min : ret2.min,
|
|
286225
|
+
max: yAxisItem.yAxisIndex === 0 ? ret1.max : ret2.max,
|
|
286226
|
+
interval: ret1.interval,
|
|
286227
|
+
nameLocation: 'end',
|
|
286228
|
+
nameTextStyle: {
|
|
286229
|
+
padding: yAxisItem.padding || null,
|
|
286230
|
+
},
|
|
286231
|
+
nameGap: 15, // 控制名称与轴线的距离
|
|
286232
|
+
axisLabel: {
|
|
286233
|
+
formatter: yAxisItem.formatter,
|
|
286234
|
+
},
|
|
286235
|
+
splitLine: {
|
|
286236
|
+
show: yAxisItem.yAxisIndex === 0 ? true : false, // 显示背景线
|
|
286237
|
+
lineStyle: {
|
|
286238
|
+
width: 1, // 背景线宽度
|
|
286239
|
+
type: 'dashed', // 背景线类型,可选:'solid', 'dashed', 'dotted'
|
|
286240
|
+
},
|
|
286241
|
+
},
|
|
286242
|
+
}
|
|
286243
|
+
})
|
|
286244
|
+
},
|
|
286245
|
+
// 数组多X轴的配置
|
|
286246
|
+
formatMultipleXAxis(xAxis) {
|
|
286247
|
+
// 获取所有 yAxisIndex 为 0 的系列数据(左侧 Y 轴)
|
|
286248
|
+
const leftxAxisData = this.datas.series
|
|
286249
|
+
.filter((serie) => serie.xAxisIndex === 0)
|
|
286250
|
+
.flatMap((serie) => serie.data)
|
|
286251
|
+
const ret1 = this.calculateAxisRange(leftxAxisData)
|
|
286252
|
+
// 获取所有 yAxisIndex 为 1 的系列数据(右侧 Y 轴)
|
|
286253
|
+
const rightxAxisData = this.datas.series
|
|
286254
|
+
.filter((serie) => serie.xAxisIndex === 1)
|
|
286255
|
+
.flatMap((serie) => serie.data)
|
|
286256
|
+
const ret2 = this.calculateAxisRange(rightxAxisData)
|
|
286257
|
+
return xAxis.map((xAxisItem) => {
|
|
286258
|
+
return {
|
|
286259
|
+
...xAxisItem, // 正确地将对象解构放入返回的对象中
|
|
286260
|
+
min: xAxisItem.xAxisIndex === 0 ? ret1.min : ret2.min,
|
|
286261
|
+
max: xAxisItem.xAxisIndex === 0 ? ret1.max : ret2.max,
|
|
286262
|
+
interval: ret1.interval,
|
|
286263
|
+
nameLocation: 'end',
|
|
286264
|
+
nameTextStyle: {
|
|
286265
|
+
padding: xAxisItem.padding || null,
|
|
286266
|
+
},
|
|
286267
|
+
nameGap: 15, // 控制名称与轴线的距离
|
|
286268
|
+
axisLabel: {
|
|
286269
|
+
formatter: xAxisItem.formatter,
|
|
286270
|
+
},
|
|
286271
|
+
splitLine: {
|
|
286272
|
+
show: xAxisItem.xAxisIndex === 0 ? false : true,
|
|
286273
|
+
lineStyle: {
|
|
286274
|
+
width: 1, // 背景线宽度
|
|
286275
|
+
type: 'dashed', // 背景线类型,可选:'solid', 'dashed', 'dotted'
|
|
286276
|
+
},
|
|
286277
|
+
},
|
|
286278
|
+
}
|
|
286279
|
+
})
|
|
286280
|
+
},
|
|
286281
|
+
calculateAxisRange(series) {
|
|
286282
|
+
// 防御性检查
|
|
286283
|
+
if (!Array.isArray(series) || series.length === 0) return [0, 0, 1] // 返回默认值,避免崩溃
|
|
286284
|
+
// 过滤无效值
|
|
286285
|
+
const validSeries = series.filter(
|
|
286286
|
+
(value) =>
|
|
286287
|
+
value !== null &&
|
|
286288
|
+
value !== undefined &&
|
|
286289
|
+
typeof value === 'number' &&
|
|
286290
|
+
!Number.isNaN(value) &&
|
|
286291
|
+
Number.isFinite(value),
|
|
286292
|
+
)
|
|
286293
|
+
if (validSeries.length === 0) return [0, 0, 1]
|
|
286294
|
+
// 计算最大值和最小值
|
|
286295
|
+
const maxDataValue = Math.max(...validSeries)
|
|
286296
|
+
const minDataValue = Math.min(...validSeries)
|
|
286297
|
+
// 确保范围有效
|
|
286298
|
+
const max = Math.ceil(maxDataValue * 1.1) // 上限扩大 10%
|
|
286299
|
+
const min = Math.floor(minDataValue * 1) // 下限保持不变
|
|
286300
|
+
// 计算 interval,确保不为 0
|
|
286301
|
+
const interval = Math.ceil((max - min) / 5) || 1 // 避免 interval 为 0
|
|
286302
|
+
return [max, min, interval]
|
|
286303
|
+
},
|
|
286304
|
+
initchart() {
|
|
286305
|
+
packages_registerTheme('westeros', packages_westeros)
|
|
286306
|
+
this.chart = packages_echarts_init(this.$refs.chart, 'westeros')
|
|
286307
|
+
const lineOption = {
|
|
286308
|
+
// 标题
|
|
286309
|
+
title: this.getTitle,
|
|
286310
|
+
grid: this.getGrid,
|
|
286311
|
+
// 提示
|
|
286312
|
+
tooltip: this.getTooltip,
|
|
286313
|
+
// 四象限
|
|
286314
|
+
graphic: this.getGraphic,
|
|
286315
|
+
// 标签
|
|
286316
|
+
legend: this.getLegend,
|
|
286317
|
+
// 横轴
|
|
286318
|
+
xAxis: this.getXaxis,
|
|
286319
|
+
// 竖轴
|
|
286320
|
+
yAxis: this.getYaxis,
|
|
286321
|
+
// 数据
|
|
286322
|
+
series: this.getSeries,
|
|
286323
|
+
dataZoom: this.getDataZoom,
|
|
286324
|
+
}
|
|
286325
|
+
this.chart.setOption(lineOption)
|
|
286326
|
+
},
|
|
286327
|
+
},
|
|
286328
|
+
});
|
|
285913
286329
|
|
|
285914
286330
|
;// ./packages/components/data-chart/index.vue?vue&type=script&lang=js
|
|
285915
286331
|
/* harmony default export */ const packages_components_data_chartvue_type_script_lang_js = (packages_data_chartvue_type_script_lang_js);
|
|
@@ -285923,8 +286339,8 @@ packages_use(packages_installLabelLayout);
|
|
|
285923
286339
|
;
|
|
285924
286340
|
var packages_data_chart_component = (0,packages_componentNormalizer["default"])(
|
|
285925
286341
|
packages_components_data_chartvue_type_script_lang_js,
|
|
285926
|
-
|
|
285927
|
-
|
|
286342
|
+
packages_data_chartvue_type_template_id_56e77c6e_render,
|
|
286343
|
+
packages_data_chartvue_type_template_id_56e77c6e_staticRenderFns,
|
|
285928
286344
|
false,
|
|
285929
286345
|
null,
|
|
285930
286346
|
null,
|