Skip to content

Feature funnel chart #1436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tested to all charts and Fixed any issues I find.
  • Loading branch information
Imiss-U1025 committed Jan 11, 2025
commit ab19a360cb8b008d7fdb1a817214bc0f67b5cdaa
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ let chartJsonModeChildren: any = {
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
echartsTitleConfig:EchartsTitleConfig,

left:withDefault(NumberControl,trans('candleStickChart.defaultLeft')),
right:withDefault(NumberControl,trans('candleStickChart.defaultRight')),
top:withDefault(NumberControl,trans('candleStickChart.defaultTop')),
bottom:withDefault(NumberControl,trans('candleStickChart.defaultBottom')),
left:withDefault(NumberControl,trans('chart.defaultLeft')),
right:withDefault(NumberControl,trans('chart.defaultRight')),
top:withDefault(NumberControl,trans('chart.defaultTop')),
bottom:withDefault(NumberControl,trans('chart.defaultBottom')),

tooltip: withDefault(BoolControl, true),
legendVisibility: withDefault(BoolControl, true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ export function chartPropertyView(
{children.echartsTitleVerticalConfig.getPropertyView()}
{children.legendConfig.getPropertyView()}
{children.title.propertyView({ label: trans("chart.title") })}
{children.left.propertyView({ label: trans("candleStickChart.left"), tooltip: trans("echarts.leftTooltip") })}
{children.right.propertyView({ label: trans("candleStickChart.right"), tooltip: trans("echarts.rightTooltip") })}
{children.top.propertyView({ label: trans("candleStickChart.top"), tooltip: trans("echarts.topTooltip") })}
{children.bottom.propertyView({ label: trans("candleStickChart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
{children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })}
{children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })}
{children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })}
{children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
{children.chartConfig.children.compType.getView() !== "pie" && (
<>
{children.xAxisDirection.propertyView({
Expand All @@ -134,7 +134,7 @@ export function chartPropertyView(
</>
)}
{hiddenPropertyView(children)}
{children.tooltip.propertyView({label: trans("themeriverChart.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
{children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
</Section>
<Section name={sectionNames.chartStyle}>
{children.chartStyle?.getPropertyView()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function getEchartsConfig(
},
xAxis: props?.echartsOption && {
type: 'category',
data: props?.echartsOption.xAxis.data,
data: props?.echartsOption.xAxis && props?.echartsOption.xAxis.data,
splitArea: !props?.axisFlagVisibility && {
show: true,
areaStyle: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,10 @@ let chartJsonModeChildren: any = {
echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")),
echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption),


left:withDefault(NumberControl,trans('candleStickChart.defaultLeft')),
right:withDefault(NumberControl,trans('candleStickChart.defaultRight')),
top:withDefault(NumberControl,trans('candleStickChart.defaultTop')),
bottom:withDefault(NumberControl,trans('candleStickChart.defaultBottom')),
left:withDefault(NumberControl,trans('chart.defaultLeft')),
right:withDefault(NumberControl,trans('chart.defaultRight')),
top:withDefault(NumberControl,trans('chart.defaultTop')),
bottom:withDefault(NumberControl,trans('chart.defaultBottom')),

echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
echartsTitleConfig:EchartsTitleConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ export function chartPropertyView(
{children.echartsTitleVerticalConfig.getPropertyView()}
{children.legendConfig.getPropertyView()}
{children.echartsTitle.propertyView({ label: trans("chart.title") })}
{children.left.propertyView({ label: trans("candleStickChart.left"), tooltip: trans("echarts.leftTooltip") })}
{children.right.propertyView({ label: trans("candleStickChart.right"), tooltip: trans("echarts.rightTooltip") })}
{children.top.propertyView({ label: trans("candleStickChart.top"), tooltip: trans("echarts.topTooltip") })}
{children.bottom.propertyView({ label: trans("candleStickChart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
{children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })}
{children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })}
{children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })}
{children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
{children.chartConfig.children.compType.getView() !== "pie" && (
<>
{children.xAxisDirection.propertyView({
Expand All @@ -133,7 +133,7 @@ export function chartPropertyView(
</>
)}
{hiddenPropertyView(children)}
{children.tooltip.propertyView({label: trans("themeriverChart.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
{children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
</Section>

<Section name={sectionNames.chartStyle}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export function getEchartsConfig(
showAbove: true,
size: Number(props?.pointerWidth) * 1.5,
itemStyle: {
color: props?.multiTitleGaugeOption?.data[0]["value"].slice(-1)[0]
color: props?.multiTitleGaugeOption?.data && props?.multiTitleGaugeOption?.data[0]["value"].slice(-1)[0]
}
},
progress: {
Expand Down Expand Up @@ -401,6 +401,8 @@ export function getEchartsConfig(
},
detail: {
...styleWrapper(props?.legendStyle, theme?.legendStyle, 16, '#ffffff', 0, 'inherit'),
"width": props?.legendStyle?.detailSize?.split('px')[0] || theme?.legendStyle?.detailSize.split('px')[0] || 40,
"height": props?.legendStyle?.detailSize?.split('px')[1] || theme?.legendStyle?.detailSize.split('px')[1] || 20,
formatter: props?.multiTitleGaugeOption?.data?.map(data => data.formatter)[0],
}
}
Expand Down Expand Up @@ -559,6 +561,8 @@ export function getEchartsConfig(
},
detail: {
...styleWrapper(props?.legendStyle, theme?.legendStyle, 16, 'inherit', 1, ''),
"width": props?.legendStyle?.detailSize?.split('px')[0] || theme?.legendStyle?.detailSize.split('px')[0] || 50,
"height": props?.legendStyle?.detailSize?.split('px')[1] || theme?.legendStyle?.detailSize.split('px')[1] || 20,
formatter: props?.ringGaugeOption?.data?.map(data => data.formatter)[0],
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ export function getEchartsConfig(
position: props.echartsLabelConfig.top,
...styleWrapper(props?.detailStyle, theme?.detailStyle,15)
},
data: props.echartsOption && props?.echartsOption?.data?.map(item => ({
data: props?.echartsOption?.data && props?.echartsOption?.data?.map(item => ({
name: item.name,
itemStyle: isColorString(item.color) && {color: item.color}
})),
links:props.echartsOption.links,
links: props.echartsOption.links,
emphasis: {
focus: props?.focus ? 'adjacency' : undefined,
},
Expand Down
16 changes: 13 additions & 3 deletions client/packages/lowcoder-comps/src/i18n/comps/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ export const en = {
axisTickColor: "AxisTick Color",
defaultBarometerPointerWidth: "3",
defaultBarometerPointerLength: "125",
defaultBarometerPointer_Y: "-10",
defaultBarometerPointer_Y: "-10"

},
echarts: {
legendVisibility: 'Legend',
defaultTitle: "Data Display",
defaultTitle: "Chart",
legendPosition: "Legend-Y",
legendOrient: "Legend Orient",
legendAlign: "Legend-X",
Expand All @@ -314,6 +314,7 @@ export const en = {
titlePositionVertical: "Title-Y",
funnelAlign: "Funnel Align",
sort: "Sort",
tooltip: "Tooltip",
changingTitle_x_Tooltip: "Change the Horizontal position of the Title.",
changingTitle_y_Tooltip: "Change the Vertical position of the Title.",
changingLegend_x_Tooltip: "Change the Vertical position of the Legend.",
Expand Down Expand Up @@ -450,7 +451,16 @@ export const en = {
ringGauge: "Ring Gauge",
barometerGauge: "Gauge Barometer chart",
clockGauge: "Clock",
default: "Default"
default: "Default",
left: 'Left',
defaultLeft:'10',
right: 'Right',
defaultRight:'10',
top: 'Top',
defaultTop:'20',
bottom: 'Bottom',
defaultBottom:'20',
defaultDataZoomBottom: '20',
},
imageEditor: {
defaultSrc: "",
Expand Down
Loading