Skip to content

Commit 81bd036

Browse files
committed
add sankey chart labels
1 parent 1383bc5 commit 81bd036

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

client/packages/lowcoder-comps/src/comps/sankeyChartComp/sankeyChartConstants.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ let chartJsonModeChildren: any = {
277277
focus: withDefault(BoolControl, true),
278278
tooltip: withDefault(BoolControl, true),
279279
legendVisibility: withDefault(BoolControl, true),
280+
labelVisibility: withDefault(BoolControl, true),
280281
}
281282

282283
if (EchartDefaultChartStyle && EchartDefaultTextStyle && RadarLabelStyle && SankeyLineStyle) {

client/packages/lowcoder-comps/src/comps/sankeyChartComp/sankeyChartPropertyView.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export function sankeyChartPropertyView(
3636
{children.draggable.propertyView({label: trans("sankeyChart.draggable"), tooltip: trans("sankeyChart.draggableTooltip")})}
3737
{children.focus.propertyView({label: trans("sankeyChart.focus"), tooltip: trans("sankeyChart.focusTooltip")})}
3838
{children.tooltip.propertyView({label: trans("sankeyChart.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
39+
{children.labelVisibility.propertyView({
40+
label: trans("treeChart.labelVisibility"),
41+
tooltip: trans("echarts.labelVisibilityTooltip")
42+
})}
3943

4044
</Section>
4145
<Section name={sectionNames.interaction}>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export function getEchartsConfig(
162162
bottom: `${props?.bottom}%`,
163163
top: `${props?.top}%`,
164164
label: {
165-
show: true,
165+
show: props.labelVisibility,
166166
position: props.echartsLabelConfig.top,
167167
...styleWrapper(props?.detailStyle, theme?.detailStyle,15)
168168
},

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ export const en = {
216216
defaultTop:'15',
217217
bottom: 'Bottom',
218218
defaultBottom:'10',
219+
labelVisibility: "Label",
220+
labelVisibilityTooltip: "Show or hide the Label of the Chart."
219221
},
220222
funnelChart: {
221223
title: 'Title',

0 commit comments

Comments
 (0)