@@ -622,14 +622,6 @@ export function getEchartsConfig(
622
622
color : '#f00' ,
623
623
fontSize : 14 // Reduced from 25
624
624
} ,
625
- anchor : {
626
- show : true ,
627
- size : 14 , // Reduced from 20
628
- itemStyle : {
629
- borderColor : '#000' ,
630
- borderWidth : 1 // Reduced border width
631
- }
632
- } ,
633
625
pointer : {
634
626
offsetCenter : [ 0 , '10%' ] ,
635
627
length : '80%' , // Reduced pointer length (from 115%) for proportionality
@@ -695,16 +687,10 @@ export function getEchartsConfig(
695
687
title : {
696
688
show : false
697
689
} ,
698
- anchor : {
699
- show : true ,
700
- size : 10 , // Smaller anchor
701
- itemStyle : {
702
- color : '#000'
703
- }
704
- }
705
690
}
706
691
]
707
692
}
693
+ console . log ( props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] )
708
694
709
695
let clockGaugeOpt = {
710
696
...basicStyle ,
@@ -722,23 +708,39 @@ export function getEchartsConfig(
722
708
clockwise : true ,
723
709
axisLine : {
724
710
lineStyle : {
725
- width : 15 ,
726
- color : [ [ 1 , 'rgba(0,0,0,0.7)' ] ] ,
727
- shadowColor : 'rgba(0, 0, 0, 0.5)' ,
728
- shadowBlur : 15
711
+ width : props . progressBarWidth ,
712
+ color : [ [ 1 , props ?. clockGaugeOption ?. data ?. map ( data => data . outlineColor ) [ 0 ] ] ] ,
713
+ shadowColor : props ?. chartStyle ?. chartShadowColor || theme ?. chartStyle ?. shadowColor ,
714
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
715
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
716
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
717
+ }
718
+ } ,
719
+ axisTick : {
720
+ length : props . axisTickLength ,
721
+ lineStyle : {
722
+ width : props . axisTickWidth ,
723
+ color : props . axisTickColor ,
724
+ shadowColor : props ?. chartStyle ?. chartShadowColor + "55" || theme ?. chartStyle ?. shadowColor + "55" ,
725
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
726
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
727
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
729
728
}
730
729
} ,
731
730
splitLine : {
731
+ length : Number ( props . axisTickLength ) * 2 ,
732
732
lineStyle : {
733
- shadowColor : 'rgba(0, 0, 0, 0.3)' ,
734
- shadowBlur : 3 ,
735
- shadowOffsetX : 1 ,
736
- shadowOffsetY : 2
733
+ width : Number ( props . axisTickWidth ) * 1.5 ,
734
+ color : props . axisTickColor ,
735
+ shadowColor : props ?. chartStyle ?. chartShadowColor + "55" || theme ?. chartStyle ?. shadowColor + "55" ,
736
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
737
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
738
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
737
739
}
738
740
} ,
739
741
axisLabel : {
740
- fontSize : 15 ,
741
- distance : 20 ,
742
+ ... styleWrapper ( props ?. axisLabelStyle , theme ?. axisLabelStyle , 16 , "#000000" ) ,
743
+ distance : Number ( props ?. progressBarWidth ) + Number ( props . axisLabelDistance ) ,
742
744
formatter : function ( value ) {
743
745
if ( value === 0 ) {
744
746
return '' ;
@@ -748,15 +750,15 @@ export function getEchartsConfig(
748
750
} ,
749
751
pointer : {
750
752
icon : 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z' ,
751
- width : 6 ,
752
- length : '55%' ,
753
+ width : props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] ?. width ,
754
+ length : props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] ?. length ,
753
755
offsetCenter : [ 0 , '8%' ] ,
754
756
itemStyle : {
755
- color : '#C0911F' ,
756
- shadowColor : 'rgba(0, 0, 0, 0.3)' ,
757
- shadowBlur : 8 ,
758
- shadowOffsetX : 2 ,
759
- shadowOffsetY : 4
757
+ color : props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] ?. color ,
758
+ shadowColor : props ?. chartStyle ?. chartShadowColor + "55" || theme ?. chartStyle ?. shadowColor + "55" ,
759
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
760
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
761
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
760
762
}
761
763
} ,
762
764
detail : {
@@ -767,7 +769,7 @@ export function getEchartsConfig(
767
769
} ,
768
770
data : [
769
771
{
770
- value : 0
772
+ value : props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] ?. value
771
773
}
772
774
]
773
775
} ,
@@ -793,28 +795,15 @@ export function getEchartsConfig(
793
795
} ,
794
796
pointer : {
795
797
icon : 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z' ,
796
- width : 4 ,
797
- length : '70%' ,
798
+ width : props ?. clockGaugeOption ?. data ?. map ( data => data . minute ) [ 0 ] ?. width ,
799
+ length : props ?. clockGaugeOption ?. data ?. map ( data => data . minute ) [ 0 ] ?. length ,
798
800
offsetCenter : [ 0 , '8%' ] ,
799
801
itemStyle : {
800
- color : '#C0911F' ,
801
- shadowColor : 'rgba(0, 0, 0, 0.3)' ,
802
- shadowBlur : 8 ,
803
- shadowOffsetX : 2 ,
804
- shadowOffsetY : 4
805
- }
806
- } ,
807
- anchor : {
808
- show : true ,
809
- size : 10 ,
810
- showAbove : false ,
811
- itemStyle : {
812
- borderWidth : 15 ,
813
- borderColor : '#C0911F' ,
814
- shadowColor : 'rgba(0, 0, 0, 0.3)' ,
815
- shadowBlur : 8 ,
816
- shadowOffsetX : 2 ,
817
- shadowOffsetY : 4
802
+ color : props ?. clockGaugeOption ?. data ?. map ( data => data . minute ) [ 0 ] ?. color ,
803
+ shadowColor : props ?. chartStyle ?. chartShadowColor + "55" || theme ?. chartStyle ?. shadowColor + "55" ,
804
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
805
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
806
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
818
807
}
819
808
} ,
820
809
detail : {
@@ -825,7 +814,7 @@ export function getEchartsConfig(
825
814
} ,
826
815
data : [
827
816
{
828
- value : 20
817
+ value : props ?. clockGaugeOption ?. data ?. map ( data => data . minute ) [ 0 ] ?. value
829
818
}
830
819
]
831
820
} ,
@@ -852,27 +841,27 @@ export function getEchartsConfig(
852
841
} ,
853
842
pointer : {
854
843
icon : 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z' ,
855
- width : 2 ,
856
- length : '85%' ,
844
+ width : props ?. clockGaugeOption ?. data ?. map ( data => data . second ) [ 0 ] ?. width ,
845
+ length : props ?. clockGaugeOption ?. data ?. map ( data => data . second ) [ 0 ] ?. length ,
857
846
offsetCenter : [ 0 , '8%' ] ,
858
847
itemStyle : {
859
- color : '#C0911F' ,
860
- shadowColor : 'rgba(0, 0, 0, 0.3)' ,
861
- shadowBlur : 8 ,
862
- shadowOffsetX : 2 ,
863
- shadowOffsetY : 4
848
+ color : props ?. clockGaugeOption ?. data ?. map ( data => data . second ) [ 0 ] ?. color ,
849
+ shadowColor : props ?. chartStyle ?. chartShadowColor + "55" || theme ?. chartStyle ?. shadowColor + "55" ,
850
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
851
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
852
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
864
853
}
865
854
} ,
866
855
anchor : {
867
856
show : true ,
868
- size : 15 ,
857
+ size : props ?. clockGaugeOption ?. data ?. map ( data => data . anchor ) [ 0 ] ?. size ,
869
858
showAbove : true ,
870
859
itemStyle : {
871
- color : '#C0911F' ,
872
- shadowColor : 'rgba(0, 0, 0, 0.3)' ,
873
- shadowBlur : 8 ,
874
- shadowOffsetX : 2 ,
875
- shadowOffsetY : 4
860
+ color : props ?. clockGaugeOption ?. data ?. map ( data => data . anchor ) [ 0 ] ?. color ,
861
+ shadowColor : props ?. chartStyle ?. chartShadowColor + "55" || theme ?. chartStyle ?. shadowColor + "55" ,
862
+ shadowBlur : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
863
+ shadowOffsetX : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
864
+ shadowOffsetY : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
876
865
}
877
866
} ,
878
867
detail : {
@@ -883,7 +872,7 @@ export function getEchartsConfig(
883
872
} ,
884
873
data : [
885
874
{
886
- value : 40
875
+ value : props ?. clockGaugeOption ?. data ?. map ( data => data . second ) [ 0 ] ?. value
887
876
}
888
877
]
889
878
}
0 commit comments