Skip to content

Commit cd45364

Browse files
committed
Fixed icon colors and changed order.
1 parent 4ae4427 commit cd45364

File tree

8 files changed

+73
-25
lines changed

8 files changed

+73
-25
lines changed

client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/echartsLegendAlignConfig.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ const FunnelLegnedAlignOptions = [
2626
export const EchartsLegendAlignConfig = (function () {
2727
return new MultiCompBuilder(
2828
{
29-
legendAlign: dropdownControl(FunnelLegnedAlignOptions, "center"),
29+
left: dropdownControl(FunnelLegnedAlignOptions, "center"),
3030
},
3131
(props): LegendComponentOption => {
3232
const config: LegendComponentOption = {
33-
left: "right",
33+
left: "center",
3434
type: "scroll",
3535
};
36-
config.left = props.legendAlign
36+
config.left = props.left
3737
return config;
3838
}
3939
)
4040
.setPropertyViewFn((children) => (
4141
<>
42-
{children.legendAlign.propertyView({
42+
{children.left.propertyView({
4343
label: trans("echarts.legendAlign"),
4444
radioButton: true,
4545
})}

client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/echartsLegendLayoutConfig.tsx renamed to client/packages/lowcoder-comps/src/comps/chartComp/chartConfigs/echartsLegendOrientConfig.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { LegendComponentOption } from "echarts";
88
import { trans } from "i18n/comps";
99

10-
const LegendLayoutOptions = [
10+
const LegendOrientOptions = [
1111
{
1212
label: <HorizontoalIcon />,
1313
value: "horizontal",
@@ -18,24 +18,24 @@ const LegendLayoutOptions = [
1818
},
1919
] as const;
2020

21-
export const EchartsLegendLayoutConfig = (function () {
21+
export const EchartsLegendOrientConfig = (function () {
2222
return new MultiCompBuilder(
2323
{
24-
legendLayout: dropdownControl(LegendLayoutOptions, "bottom"),
24+
orient: dropdownControl(LegendOrientOptions, "horizontal"),
2525
},
2626
(props): LegendComponentOption => {
2727
const config: LegendComponentOption = {
28-
orient: "vertical",
28+
orient: "horizontal",
2929
type: "scroll"
3030
};
31-
config.orient = props.legendLayout
31+
config.orient = props.orient
3232
return config;
3333
}
3434
)
3535
.setPropertyViewFn((children) => (
3636
<>
37-
{children.legendLayout.propertyView({
38-
label: trans("echarts.legendLayout"),
37+
{children.orient.propertyView({
38+
label: trans("echarts.legendOrient"),
3939
radioButton: true,
4040
})}
4141
</>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import {
2+
AlignBottom,
3+
AlignTop,
4+
dropdownControl,
5+
MultiCompBuilder,
6+
} from "lowcoder-sdk";
7+
import { LegendComponentOption } from "echarts";
8+
import { trans } from "i18n/comps";
9+
10+
const LegendPositionOptions = [
11+
{
12+
label: <AlignBottom />,
13+
value: "bottom",
14+
},
15+
{
16+
label: <AlignTop />,
17+
value: "top",
18+
},
19+
] as const;
20+
21+
export const EchartsTitleVerticalConfig = (function () {
22+
return new MultiCompBuilder(
23+
{
24+
position: dropdownControl(LegendPositionOptions, "top"),
25+
},
26+
(props): LegendComponentOption => {
27+
const config: LegendComponentOption = {
28+
top: "top",
29+
type: "scroll",
30+
};
31+
config.top = props.position
32+
return config;
33+
}
34+
)
35+
.setPropertyViewFn((children) => (
36+
<>
37+
{children.position.propertyView({
38+
label: trans("echarts.titlePositionVertical"),
39+
radioButton: true,
40+
})}
41+
</>
42+
))
43+
.build();
44+
})();

client/packages/lowcoder-comps/src/comps/funnelChartComp/funnelChartConstants.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ import { FunnelChartConfig} from "../chartComp/chartConfigs/funnelChartConfig";
3737
import { EchartsTitleConfig } from "comps/chartComp/chartConfigs/echartsTitleConfig";
3838
import { EchartsSortingConfig } from "../chartComp/chartConfigs/echartsSortingConfig";
3939
import { EchartsLegendAlignConfig } from "../chartComp/chartConfigs/echartsLegendAlignConfig";
40-
import { EchartsLegendLayoutConfig } from "../chartComp/chartConfigs/echartsLegendLayoutConfig";
40+
import { EchartsLegendOrientConfig } from "../chartComp/chartConfigs/echartsLegendOrientConfig";
41+
import { EchartsTitleVerticalConfig } from "../chartComp/chartConfigs/echartsTitleVerticalConfig";
4142

4243
export const ChartTypeOptions = [
4344
{
@@ -261,10 +262,11 @@ let chartJsonModeChildren: any = {
261262
echartsSortingConfig: EchartsSortingConfig,
262263
echartsLabelConfig: EchartsLabelConfig,
263264
echartsFunnelAlignConfig: EchartsFunnelAlignConfig,
264-
echartsLegendLayoutConfig: EchartsLegendLayoutConfig,
265+
echartsLegendOrientConfig: EchartsLegendOrientConfig,
265266
echartsLegendAlignConfig: EchartsLegendAlignConfig,
266267
echartsConfig: EchartsOptionComp,
267268
echartsTitleConfig:EchartsTitleConfig,
269+
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
268270
// style: styleControl(EchartsStyle, 'style'),
269271
tooltip: withDefault(BoolControl, true),
270272
label: withDefault(BoolControl, true),

client/packages/lowcoder-comps/src/comps/funnelChartComp/funnelChartPropertyView.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ export function funnelChartPropertyView(
3131
</div>
3232
),
3333
})}
34-
{children.legendVisibility.getView()&& children.echartsLegendConfig.getPropertyView()}
34+
{children.echartsTitleVerticalConfig.getPropertyView()}
35+
{children.echartsTitleConfig.getPropertyView()}
36+
{children.legendVisibility.getView() && children.echartsLegendConfig.getPropertyView()}
37+
{children.legendVisibility.getView() && children.echartsLegendOrientConfig.getPropertyView()}
38+
{children.legendVisibility.getView() && children.echartsLegendAlignConfig.getPropertyView()}
3539
{children.echartsSortingConfig.getPropertyView()}
3640
{children.label.getView()&& children.echartsLabelConfig.getPropertyView()}
3741
{children.echartsFunnelAlignConfig.getPropertyView()}
38-
{children.legendVisibility.getView() && children.echartsLegendLayoutConfig.getPropertyView()}
39-
{children.legendVisibility.getView() && children.echartsLegendAlignConfig.getPropertyView()}
40-
{children.echartsTitleConfig.getPropertyView()}
4142
{children.left.propertyView({ label: trans("funnelChart.left") })}
4243
{children.top.propertyView({ label: trans("funnelChart.top") })}
4344
{children.bottom.propertyView({ label: trans("funnelChart.bottom") })}

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,14 @@ export const en = {
141141
},
142142
echarts: {
143143
defaultTitle: "Data Display",
144-
legendPosition: "Legend Position",
145-
labelPosition: "Label Position",
146-
titlePosition: "Title Position",
144+
legendPosition: "Legend-X",
145+
legendOrient: "Legend Orient",
146+
legendAlign: "Legend-Y",
147+
labelPosition: "Label-X",
148+
titlePosition: "Title-X",
149+
titlePositionVertical: "Title-Y",
147150
funnelAlign: "Funnel Align",
148151
sort: "Sort",
149-
legendLayout: "Chart Legend Layout",
150-
legendAlign: "Chart Legend Align"
151152
},
152153
chart: {
153154
delete: "Delete",

client/packages/lowcoder-design/src/icons/remix/horizontal.svg

Lines changed: 2 additions & 2 deletions
Loading

client/packages/lowcoder-design/src/icons/remix/vertical.svg

Lines changed: 1 addition & 1 deletion
Loading

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