@@ -577,8 +577,8 @@ export function getEchartsConfig(
577577 height : 12 ,
578578 borderRadius : 20 ,
579579 borderWidth : 1 ,
580- ...styleWrapper ( props ?. legendStyle , theme ?. legendStyle , 16 , '#000000 ' ) ,
581- // backgroundColor : 'inherit',
580+ ...styleWrapper ( props ?. legendStyle , theme ?. legendStyle , 16 , 'inherit ' ) ,
581+ borderColor : 'inherit' ,
582582 formatter : props ?. multiTitleGaugeOption ?. data ?. map ( data => data . formatter ) [ 0 ] ,
583583 }
584584 }
@@ -589,111 +589,113 @@ export function getEchartsConfig(
589589 ...basic ,
590590 series : [
591591 {
592+ ...basicSeries ,
592593 type : 'gauge' ,
593- min : 0 ,
594- max : 100 ,
595- center : [ '50%' , '60%' ] ,
596- splitNumber : 10 ,
597- radius : '70%' , // Reduced from 80% to fit a smaller canvas
594+ min : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. period [ 0 ] ,
595+ max : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. period [ 1 ] ,
596+ center : [ ` ${ props ?. position_x } %` , ` ${ props ?. position_y } %` ] ,
597+ splitNumber : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. splitNumber ,
598+ radius : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. radius ,
598599 axisLine : {
599600 lineStyle : {
600- color : [ [ 1 , '#f00' ] ] ,
601- width : 2 // Reduced line width
601+ color : [ [ 1 , props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. color ] ] ,
602+ width : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. progressBarWidth
602603 }
603604 } ,
604605 splitLine : {
605606 distance : - 12 , // Reduced from -18
606- length : 10 , // Reduced from 18
607+ length : Number ( props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickLength ) * 2 ,
607608 lineStyle : {
608- color : '#f00' ,
609- width : 2 // Thinner line
609+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. color ,
610+ width : Number ( props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickWidth ) * 1.5
610611 }
611612 } ,
612613 axisTick : {
613614 distance : - 8 , // Reduced from -12
614- length : 6 , // Reduced from 10
615+ length : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickLength ,
615616 lineStyle : {
616- color : '#f00' ,
617- width : 1
617+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. color ,
618+ width : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickWidth
618619 }
619620 } ,
620621 axisLabel : {
621622 distance : - 30 , // Reduced from -50 to bring labels closer
622- color : '#f00' ,
623- fontSize : 14 // Reduced from 25
623+ ...styleWrapper ( props ?. axisLabelStyle , theme ?. axisLabelStyle , 14 , '#f00' )
624624 } ,
625625 pointer : {
626- offsetCenter : [ 0 , '10%' ] ,
627- length : '80%' , // Reduced pointer length (from 115%) for proportionality
628- icon : 'path://M2090.36389,615.30999 L2090.36389,615.30999 C2091.48372,615.30999 2092.40383,616.194028 2092.44859,617.312956 L2096.90698,728.755929 C2097.05155,732.369577 2094.2393,735.416212 2090.62566,735.56078 C2090.53845,735.564269 2090.45117,735.566014 2090.36389,735.566014 L2090.36389,735.566014 C2086.74736,735.566014 2083.81557,732.63423 2083.81557,729.017692 C2083.81557,728.930412 2083.81732,728.84314 2083.82081,728.755929 L2088.2792,617.312956 C2088.32396,616.194028 2089.24407,615.30999 2090.36389,615.30999 Z' ,
626+ ...basicSeries . pointer ,
627+ icon : props ?. barometerPointerIcon ,
629628 itemStyle : {
630- color : '#000'
629+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. color
631630 }
632631 } ,
633632 detail : {
634633 valueAnimation : true ,
635634 precision : 2 , // Increase precision or keep as is
636- fontSize : 16 , // Reduced from default larger size
635+ ... styleWrapper ( props ?. legendStyle , theme ?. legendStyle , 16 ) ,
637636 offsetCenter : [ 0 , '40%' ] // Adjust to fit within the smaller radius
638637 } ,
639638 title : {
640639 offsetCenter : [ 0 , '-40%' ] , // Adjust title placement for smaller chart
641- fontSize : 14 // Smaller font
640+ ... styleWrapper ( props ?. labelStyle , theme ?. labelStyle , 14 )
642641 } ,
643642 data : [
644643 {
645- value : 58.46 ,
646- name : 'PLP'
644+ value : props ?. barometerGaugeOption ?. data [ 0 ] ?. value ,
645+ name : props ?. barometerGaugeOption ?. data [ 0 ] ?. name ,
647646 }
648647 ]
649648 } ,
650649 {
650+ ...basicSeries ,
651651 type : 'gauge' ,
652- min : 0 ,
653- max : 60 ,
654- center : [ '50%' , '60%' ] ,
655- splitNumber : 6 ,
656- radius : '60%' , // Match the radius
652+ min : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. period [ 0 ] ,
653+ max : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. period [ 1 ] ,
654+ center : [ ` ${ props ?. position_x } %` , ` ${ props ?. position_y } %` ] ,
655+ splitNumber : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. splitNumber ,
656+ radius : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. radius ,
657657 axisLine : {
658658 lineStyle : {
659- color : [ [ 1 , '#000' ] ] ,
660- width : 2
659+ color : [ [ 1 , props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. color ] ] ,
660+ width : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. progressBarWidth
661661 }
662662 } ,
663663 splitLine : {
664664 distance : - 2 , // Adjust spacing
665- length : 10 , // Reduced length
665+ length : Number ( props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickLength ) * 2 ,
666666 lineStyle : {
667- color : '#000' ,
668- width : 2
667+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. color ,
668+ width : Number ( props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickWidth ) * 1.5
669669 }
670670 } ,
671671 axisTick : {
672672 distance : 0 ,
673- length : 6 , // Reduced
673+ length : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickLength ,
674674 lineStyle : {
675- color : '#000' ,
676- width : 1
675+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. color ,
676+ width : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickWidth
677677 }
678678 } ,
679679 axisLabel : {
680- distance : 6 , // Reduced label distance
681- fontSize : 14 , // Smaller font
682- color : '#000'
680+ distance : 6 ,
681+ ...styleWrapper ( props ?. axisLabelStyleOutline , theme ?. axisLabelStyleOutline , 14 , '#000' ) ,
683682 } ,
684683 pointer : {
685684 show : false
686685 } ,
687686 title : {
688687 show : false
689688 } ,
689+ detail : {
690+ show : false
691+ }
690692 }
691693 ]
692694 }
693- console . log ( props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] )
694695
695696 let clockGaugeOpt = {
696697 ...basicStyle ,
698+ tooltip : false ,
697699 series : [
698700 {
699701 ...basicSeries ,
0 commit comments