Skip to content

Commit 186aa15

Browse files
committed
Fixed Clock Pointer Icons on Clock Chart.
1 parent c87b7b3 commit 186aa15

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

client/packages/lowcoder-comps/src/comps/gaugeChartComp/gaugeChartConstants.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ let chartJsonModeChildren: any = {
306306
pointer_Y:withDefault(NumberControl,trans('gaugeChart.defaultPointer_Y')),
307307
pointerIcon:withDefault(StringControl),
308308
gradePointerIcon:withDefault(StringControl, trans('gaugeChart.gradeDefaultPointerIcon')),
309+
clockPointerIcon:withDefault(StringControl, trans('gaugeChart.clockDefaultPointerIcon')),
309310
progressBarWidth:withDefault(NumberControl,trans('gaugeChart.defaultProgressBarWidth')),
310311
axisTickWidth: withDefault(NumberControl, trans('gaugeChart.defaultAxisTickWidth')),
311312
axisTickLength: withDefault(NumberControl, trans('gaugeChart.defaultAxisTickLength')),

client/packages/lowcoder-comps/src/comps/gaugeChartComp/gaugeChartPropertyView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ export function gaugeChartPropertyView(
482482
{children.echartsTitleConfig.getPropertyView()}
483483
{children.echartsTitle.propertyView({ label: trans("gaugeChart.title"), tooltip: trans("echarts.titleTooltip") })}
484484
{children.radius.propertyView({ label: trans("gaugeChart.radius"), tooltip: trans("echarts.radiusTooltip") })}
485-
{children.pointerIcon.propertyView({ label: trans("gaugeChart.pointerIcon"), tooltip: trans("gaugeChart.pointerIconTooltip") })}
485+
{children.clockPointerIcon.propertyView({ label: trans("gaugeChart.pointerIcon"), tooltip: trans("gaugeChart.pointerIconTooltip") })}
486486
{children.progressBarWidth.propertyView({ label: trans("gaugeChart.progressBarWidth"), tooltip: trans("echarts.pointerWidthTooltip") })}
487487
{children.axisTickLength.propertyView({ label: trans("gaugeChart.axisTickLength"), tooltip: trans("echarts.axisTickLengthTooltip") })}
488488
{children.axisTickWidth.propertyView({ label: trans("gaugeChart.axisTickWidth"), tooltip: trans("echarts.axisTickWidthTooltip") })}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ export function getEchartsConfig(
749749
}
750750
},
751751
pointer: {
752-
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',
752+
icon: props?.clockPointerIcon,
753753
width: props?.clockGaugeOption?.data?.map(data => data.hour)[0]?.width,
754754
length: props?.clockGaugeOption?.data?.map(data => data.hour)[0]?.length,
755755
offsetCenter: [0, '8%'],
@@ -794,7 +794,7 @@ export function getEchartsConfig(
794794
show: false
795795
},
796796
pointer: {
797-
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',
797+
icon: props?.clockPointerIcon,
798798
width: props?.clockGaugeOption?.data?.map(data => data.minute)[0]?.width,
799799
length: props?.clockGaugeOption?.data?.map(data => data.minute)[0]?.length,
800800
offsetCenter: [0, '8%'],
@@ -840,7 +840,7 @@ export function getEchartsConfig(
840840
show: false
841841
},
842842
pointer: {
843-
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',
843+
icon: props?.clockPointerIcon,
844844
width: props?.clockGaugeOption?.data?.map(data => data.second)[0]?.width,
845845
length: props?.clockGaugeOption?.data?.map(data => data.second)[0]?.length,
846846
offsetCenter: [0, '8%'],

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export const en = {
145145
chartTypeTooltip: "Select the types of Charts.",
146146
defaultPointer_Y: "0",
147147
gradeDefaultPointerIcon: "path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",
148+
clockDefaultPointerIcon: "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",
148149
pointer_Y: "Pointer-Y",
149150
pointer_Y_Tooltip: "select vertical of pointer",
150151
pointerIcon: "Pointer Icon",

0 commit comments

Comments
 (0)