Skip to content

Commit 1446343

Browse files
committed
Tested to all charts and Fixed any issues I find.
1 parent f7b46b0 commit 1446343

File tree

8 files changed

+39
-26
lines changed

8 files changed

+39
-26
lines changed

client/packages/lowcoder-comps/src/comps/basicChartComp/chartConstants.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ let chartJsonModeChildren: any = {
261261
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
262262
echartsTitleConfig:EchartsTitleConfig,
263263

264-
left:withDefault(NumberControl,trans('candleStickChart.defaultLeft')),
265-
right:withDefault(NumberControl,trans('candleStickChart.defaultRight')),
266-
top:withDefault(NumberControl,trans('candleStickChart.defaultTop')),
267-
bottom:withDefault(NumberControl,trans('candleStickChart.defaultBottom')),
264+
left:withDefault(NumberControl,trans('chart.defaultLeft')),
265+
right:withDefault(NumberControl,trans('chart.defaultRight')),
266+
top:withDefault(NumberControl,trans('chart.defaultTop')),
267+
bottom:withDefault(NumberControl,trans('chart.defaultBottom')),
268268

269269
tooltip: withDefault(BoolControl, true),
270270
legendVisibility: withDefault(BoolControl, true),

client/packages/lowcoder-comps/src/comps/basicChartComp/chartPropertyView.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ export function chartPropertyView(
119119
{children.echartsTitleVerticalConfig.getPropertyView()}
120120
{children.legendConfig.getPropertyView()}
121121
{children.title.propertyView({ label: trans("chart.title") })}
122-
{children.left.propertyView({ label: trans("candleStickChart.left"), tooltip: trans("echarts.leftTooltip") })}
123-
{children.right.propertyView({ label: trans("candleStickChart.right"), tooltip: trans("echarts.rightTooltip") })}
124-
{children.top.propertyView({ label: trans("candleStickChart.top"), tooltip: trans("echarts.topTooltip") })}
125-
{children.bottom.propertyView({ label: trans("candleStickChart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
122+
{children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })}
123+
{children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })}
124+
{children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })}
125+
{children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
126126
{children.chartConfig.children.compType.getView() !== "pie" && (
127127
<>
128128
{children.xAxisDirection.propertyView({
@@ -134,7 +134,7 @@ export function chartPropertyView(
134134
</>
135135
)}
136136
{hiddenPropertyView(children)}
137-
{children.tooltip.propertyView({label: trans("themeriverChart.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
137+
{children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
138138
</Section>
139139
<Section name={sectionNames.chartStyle}>
140140
{children.chartStyle?.getPropertyView()}

client/packages/lowcoder-comps/src/comps/candleStickChartComp/candleStickChartUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function getEchartsConfig(
187187
},
188188
xAxis: props?.echartsOption && {
189189
type: 'category',
190-
data: props?.echartsOption.xAxis.data,
190+
data: props?.echartsOption.xAxis && props?.echartsOption.xAxis.data,
191191
splitArea: !props?.axisFlagVisibility && {
192192
show: true,
193193
areaStyle: {

client/packages/lowcoder-comps/src/comps/chartComp/chartConstants.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,10 @@ let chartJsonModeChildren: any = {
266266
echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")),
267267
echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption),
268268

269-
270-
left:withDefault(NumberControl,trans('candleStickChart.defaultLeft')),
271-
right:withDefault(NumberControl,trans('candleStickChart.defaultRight')),
272-
top:withDefault(NumberControl,trans('candleStickChart.defaultTop')),
273-
bottom:withDefault(NumberControl,trans('candleStickChart.defaultBottom')),
269+
left:withDefault(NumberControl,trans('chart.defaultLeft')),
270+
right:withDefault(NumberControl,trans('chart.defaultRight')),
271+
top:withDefault(NumberControl,trans('chart.defaultTop')),
272+
bottom:withDefault(NumberControl,trans('chart.defaultBottom')),
274273

275274
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
276275
echartsTitleConfig:EchartsTitleConfig,

client/packages/lowcoder-comps/src/comps/chartComp/chartPropertyView.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ export function chartPropertyView(
118118
{children.echartsTitleVerticalConfig.getPropertyView()}
119119
{children.legendConfig.getPropertyView()}
120120
{children.echartsTitle.propertyView({ label: trans("chart.title") })}
121-
{children.left.propertyView({ label: trans("candleStickChart.left"), tooltip: trans("echarts.leftTooltip") })}
122-
{children.right.propertyView({ label: trans("candleStickChart.right"), tooltip: trans("echarts.rightTooltip") })}
123-
{children.top.propertyView({ label: trans("candleStickChart.top"), tooltip: trans("echarts.topTooltip") })}
124-
{children.bottom.propertyView({ label: trans("candleStickChart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
121+
{children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })}
122+
{children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })}
123+
{children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })}
124+
{children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
125125
{children.chartConfig.children.compType.getView() !== "pie" && (
126126
<>
127127
{children.xAxisDirection.propertyView({
@@ -133,7 +133,7 @@ export function chartPropertyView(
133133
</>
134134
)}
135135
{hiddenPropertyView(children)}
136-
{children.tooltip.propertyView({label: trans("themeriverChart.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
136+
{children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
137137
</Section>
138138

139139
<Section name={sectionNames.chartStyle}>

client/packages/lowcoder-comps/src/comps/gaugeChartComp/gaugeChartUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export function getEchartsConfig(
364364
showAbove: true,
365365
size: Number(props?.pointerWidth) * 1.5,
366366
itemStyle: {
367-
color: props?.multiTitleGaugeOption?.data[0]["value"].slice(-1)[0]
367+
color: props?.multiTitleGaugeOption?.data && props?.multiTitleGaugeOption?.data[0]["value"].slice(-1)[0]
368368
}
369369
},
370370
progress: {
@@ -401,6 +401,8 @@ export function getEchartsConfig(
401401
},
402402
detail: {
403403
...styleWrapper(props?.legendStyle, theme?.legendStyle, 16, '#ffffff', 0, 'inherit'),
404+
"width": props?.legendStyle?.detailSize?.split('px')[0] || theme?.legendStyle?.detailSize.split('px')[0] || 40,
405+
"height": props?.legendStyle?.detailSize?.split('px')[1] || theme?.legendStyle?.detailSize.split('px')[1] || 20,
404406
formatter: props?.multiTitleGaugeOption?.data?.map(data => data.formatter)[0],
405407
}
406408
}
@@ -559,6 +561,8 @@ export function getEchartsConfig(
559561
},
560562
detail: {
561563
...styleWrapper(props?.legendStyle, theme?.legendStyle, 16, 'inherit', 1, ''),
564+
"width": props?.legendStyle?.detailSize?.split('px')[0] || theme?.legendStyle?.detailSize.split('px')[0] || 50,
565+
"height": props?.legendStyle?.detailSize?.split('px')[1] || theme?.legendStyle?.detailSize.split('px')[1] || 20,
562566
formatter: props?.ringGaugeOption?.data?.map(data => data.formatter)[0],
563567
}
564568
}

client/packages/lowcoder-comps/src/comps/sankeyChartComp/sankeyChartUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ export function getEchartsConfig(
166166
position: props.echartsLabelConfig.top,
167167
...styleWrapper(props?.detailStyle, theme?.detailStyle,15)
168168
},
169-
data: props.echartsOption && props?.echartsOption?.data?.map(item => ({
169+
data: props?.echartsOption?.data && props?.echartsOption?.data?.map(item => ({
170170
name: item.name,
171171
itemStyle: isColorString(item.color) && {color: item.color}
172172
})),
173-
links:props.echartsOption.links,
173+
links: props.echartsOption.links,
174174
emphasis: {
175175
focus: props?.focus ? 'adjacency' : undefined,
176176
},

client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ export const en = {
300300
axisTickColor: "AxisTick Color",
301301
defaultBarometerPointerWidth: "3",
302302
defaultBarometerPointerLength: "125",
303-
defaultBarometerPointer_Y: "-10",
303+
defaultBarometerPointer_Y: "-10"
304304

305305
},
306306
echarts: {
307307
legendVisibility: 'Legend',
308-
defaultTitle: "Data Display",
308+
defaultTitle: "Chart",
309309
legendPosition: "Legend-Y",
310310
legendOrient: "Legend Orient",
311311
legendAlign: "Legend-X",
@@ -314,6 +314,7 @@ export const en = {
314314
titlePositionVertical: "Title-Y",
315315
funnelAlign: "Funnel Align",
316316
sort: "Sort",
317+
tooltip: "Tooltip",
317318
changingTitle_x_Tooltip: "Change the Horizontal position of the Title.",
318319
changingTitle_y_Tooltip: "Change the Vertical position of the Title.",
319320
changingLegend_x_Tooltip: "Change the Vertical position of the Legend.",
@@ -450,7 +451,16 @@ export const en = {
450451
ringGauge: "Ring Gauge",
451452
barometerGauge: "Gauge Barometer chart",
452453
clockGauge: "Clock",
453-
default: "Default"
454+
default: "Default",
455+
left: 'Left',
456+
defaultLeft:'10',
457+
right: 'Right',
458+
defaultRight:'10',
459+
top: 'Top',
460+
defaultTop:'20',
461+
bottom: 'Bottom',
462+
defaultBottom:'20',
463+
defaultDataZoomBottom: '20',
454464
},
455465
imageEditor: {
456466
defaultSrc: "",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy