@@ -577,8 +577,8 @@ export function getEchartsConfig(
577
577
height : 12 ,
578
578
borderRadius : 20 ,
579
579
borderWidth : 1 ,
580
- ...styleWrapper ( props ?. legendStyle , theme ?. legendStyle , 16 , '#000000 ' ) ,
581
- // backgroundColor : 'inherit',
580
+ ...styleWrapper ( props ?. legendStyle , theme ?. legendStyle , 16 , 'inherit ' ) ,
581
+ borderColor : 'inherit' ,
582
582
formatter : props ?. multiTitleGaugeOption ?. data ?. map ( data => data . formatter ) [ 0 ] ,
583
583
}
584
584
}
@@ -589,111 +589,113 @@ export function getEchartsConfig(
589
589
...basic ,
590
590
series : [
591
591
{
592
+ ...basicSeries ,
592
593
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 ,
598
599
axisLine : {
599
600
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
602
603
}
603
604
} ,
604
605
splitLine : {
605
606
distance : - 12 , // Reduced from -18
606
- length : 10 , // Reduced from 18
607
+ length : Number ( props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickLength ) * 2 ,
607
608
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
610
611
}
611
612
} ,
612
613
axisTick : {
613
614
distance : - 8 , // Reduced from -12
614
- length : 6 , // Reduced from 10
615
+ length : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickLength ,
615
616
lineStyle : {
616
- color : '#f00' ,
617
- width : 1
617
+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. color ,
618
+ width : props ?. barometerGaugeOption ?. data [ 0 ] ?. outline ?. axisTickWidth
618
619
}
619
620
} ,
620
621
axisLabel : {
621
622
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' )
624
624
} ,
625
625
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 ,
629
628
itemStyle : {
630
- color : '#000'
629
+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. color
631
630
}
632
631
} ,
633
632
detail : {
634
633
valueAnimation : true ,
635
634
precision : 2 , // Increase precision or keep as is
636
- fontSize : 16 , // Reduced from default larger size
635
+ ... styleWrapper ( props ?. legendStyle , theme ?. legendStyle , 16 ) ,
637
636
offsetCenter : [ 0 , '40%' ] // Adjust to fit within the smaller radius
638
637
} ,
639
638
title : {
640
639
offsetCenter : [ 0 , '-40%' ] , // Adjust title placement for smaller chart
641
- fontSize : 14 // Smaller font
640
+ ... styleWrapper ( props ?. labelStyle , theme ?. labelStyle , 14 )
642
641
} ,
643
642
data : [
644
643
{
645
- value : 58.46 ,
646
- name : 'PLP'
644
+ value : props ?. barometerGaugeOption ?. data [ 0 ] ?. value ,
645
+ name : props ?. barometerGaugeOption ?. data [ 0 ] ?. name ,
647
646
}
648
647
]
649
648
} ,
650
649
{
650
+ ...basicSeries ,
651
651
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 ,
657
657
axisLine : {
658
658
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
661
661
}
662
662
} ,
663
663
splitLine : {
664
664
distance : - 2 , // Adjust spacing
665
- length : 10 , // Reduced length
665
+ length : Number ( props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickLength ) * 2 ,
666
666
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
669
669
}
670
670
} ,
671
671
axisTick : {
672
672
distance : 0 ,
673
- length : 6 , // Reduced
673
+ length : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickLength ,
674
674
lineStyle : {
675
- color : '#000' ,
676
- width : 1
675
+ color : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. color ,
676
+ width : props ?. barometerGaugeOption ?. data [ 0 ] ?. inline ?. axisTickWidth
677
677
}
678
678
} ,
679
679
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' ) ,
683
682
} ,
684
683
pointer : {
685
684
show : false
686
685
} ,
687
686
title : {
688
687
show : false
689
688
} ,
689
+ detail : {
690
+ show : false
691
+ }
690
692
}
691
693
]
692
694
}
693
- console . log ( props ?. clockGaugeOption ?. data ?. map ( data => data . hour ) [ 0 ] )
694
695
695
696
let clockGaugeOpt = {
696
697
...basicStyle ,
698
+ tooltip : false ,
697
699
series : [
698
700
{
699
701
...basicSeries ,
0 commit comments