@@ -622,14 +622,6 @@ export function getEchartsConfig(
622622 color : '#f00' ,
623623 fontSize : 14 // Reduced from 25
624624 } ,
625- anchor : {
626- show : true ,
627- size : 14 , // Reduced from 20
628- itemStyle : {
629- borderColor : '#000' ,
630- borderWidth : 1 // Reduced border width
631- }
632- } ,
633625 pointer : {
634626 offsetCenter : [ 0 , '10%' ] ,
635627 length : '80%' , // Reduced pointer length (from 115%) for proportionality
@@ -695,16 +687,10 @@ export function getEchartsConfig(
695687 title : {
696688 show : false
697689 } ,
698- anchor : {
699- show : true ,
700- size : 10 , // Smaller anchor
701- itemStyle : {
702- color : '#000'
703- }
704- }
705690 }
706691 ]
707692 }
693+ console . log ( props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] )
708694
709695 let clockGaugeOpt = {
710696 ...basicStyle ,
@@ -722,23 +708,39 @@ export function getEchartsConfig(
722708 clockwise : true ,
723709 axisLine : {
724710 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 ]
729728 }
730729 } ,
731730 splitLine : {
731+ length : Number ( props . axisTickLength ) * 2 ,
732732 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 ]
737739 }
738740 } ,
739741 axisLabel : {
740- fontSize : 15 ,
741- distance : 20 ,
742+ ... styleWrapper ( props ?. axisLabelStyle , theme ?. axisLabelStyle , 16 , "#000000" ) ,
743+ distance : Number ( props ?. progressBarWidth ) + Number ( props . axisLabelDistance ) ,
742744 formatter : function ( value ) {
743745 if ( value === 0 ) {
744746 return '' ;
@@ -748,15 +750,15 @@ export function getEchartsConfig(
748750 } ,
749751 pointer : {
750752 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 ,
753755 offsetCenter : [ 0 , '8%' ] ,
754756 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 ]
760762 }
761763 } ,
762764 detail : {
@@ -767,7 +769,7 @@ export function getEchartsConfig(
767769 } ,
768770 data : [
769771 {
770- value : 0
772+ value : props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] ?. value
771773 }
772774 ]
773775 } ,
@@ -793,28 +795,15 @@ export function getEchartsConfig(
793795 } ,
794796 pointer : {
795797 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 ,
798800 offsetCenter : [ 0 , '8%' ] ,
799801 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 ]
818807 }
819808 } ,
820809 detail : {
@@ -825,7 +814,7 @@ export function getEchartsConfig(
825814 } ,
826815 data : [
827816 {
828- value : 20
817+ value : props ?. clockGaugeOption ?. data ?. map ( data => data . minute ) [ 0 ] ?. value
829818 }
830819 ]
831820 } ,
@@ -852,27 +841,27 @@ export function getEchartsConfig(
852841 } ,
853842 pointer : {
854843 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 ,
857846 offsetCenter : [ 0 , '8%' ] ,
858847 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 ]
864853 }
865854 } ,
866855 anchor : {
867856 show : true ,
868- size : 15 ,
857+ size : props ?. clockGaugeOption ?. data ?. map ( data => data . anchor ) [ 0 ] ?. size ,
869858 showAbove : true ,
870859 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 ]
876865 }
877866 } ,
878867 detail : {
@@ -883,7 +872,7 @@ export function getEchartsConfig(
883872 } ,
884873 data : [
885874 {
886- value : 40
875+ value : props ?. clockGaugeOption ?. data ?. map ( data => data . second ) [ 0 ] ?. value
887876 }
888877 ]
889878 }
0 commit comments