File tree 3 files changed +18
-4
lines changed
client/packages/lowcoder-comps/src
basicChartComp/chartConfigs
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export const LineChartConfig = (function () {
32
32
return new MultiCompBuilder (
33
33
{
34
34
showLabel : BoolControl ,
35
+ showEndLabel : BoolControl ,
35
36
stacked : BoolControl ,
36
37
area : BoolControl ,
37
38
smooth : BoolControl ,
@@ -71,6 +72,13 @@ export const LineChartConfig = (function () {
71
72
if ( props . smooth ) {
72
73
config . smooth = true ;
73
74
}
75
+ if ( props . showEndLabel ) {
76
+ config . endLabel = {
77
+ show : true ,
78
+ formatter : '{a}' ,
79
+ distance : 20
80
+ }
81
+ }
74
82
return config ;
75
83
}
76
84
)
@@ -83,6 +91,9 @@ export const LineChartConfig = (function () {
83
91
label : trans ( "lineChart.area" ) ,
84
92
} ) }
85
93
{ showLabelPropertyView ( children ) }
94
+ { children . showEndLabel . propertyView ( {
95
+ label : trans ( "lineChart.showEndLabel" ) ,
96
+ } ) }
86
97
{ children . smooth . propertyView ( { label : trans ( "chart.smooth" ) } ) }
87
98
{ children . itemColor . getPropertyView ( ) }
88
99
</ >
Original file line number Diff line number Diff line change @@ -203,9 +203,11 @@ export function getEchartsConfig(
203
203
...gridPos ,
204
204
containLabel : true ,
205
205
} ,
206
- visualMap : {
206
+ } ;
207
+ if ( props . areaPieces . length > 0 ) {
208
+ config . visualMap = {
207
209
type : 'piecewise' ,
208
- show : props . areaPieces . length > 0 ,
210
+ show : false ,
209
211
dimension : 0 ,
210
212
seriesIndex : 0 ,
211
213
pieces : props . areaPieces ?. filter ( p => p . getView ( ) . from && p . getView ( ) . to && p . getView ( ) . color ) ?. map ( p => (
@@ -215,8 +217,8 @@ export function getEchartsConfig(
215
217
...( p . getView ( ) . color ?{ color : p . getView ( ) . color } :{ } ) ,
216
218
}
217
219
) )
218
- } ,
219
- } ;
220
+ }
221
+ }
220
222
console . log ( "config" , config )
221
223
if ( props . chartConfig . race ) {
222
224
config = {
Original file line number Diff line number Diff line change @@ -328,6 +328,7 @@ export const en = {
328
328
color : "Color" ,
329
329
areaPieces : "Area Pieces" ,
330
330
areaPiece : "Area Piece" ,
331
+ showEndLabel : "End Label" ,
331
332
} ,
332
333
barChart : {
333
334
title : 'Title' ,
You can’t perform that action at this time.
0 commit comments