Skip to content

Commit d7ab34f

Browse files
committed
start/end angle
1 parent 8d2427a commit d7ab34f

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

client/packages/lowcoder-comps/src/comps/pieChartComp/pieChartUtils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export function getSeriesConfig(props: EchartsConfigProps) {
7373
...props.chartConfig,
7474
radius: radiusAndCenter.radius,
7575
center: radiusAndCenter.center,
76+
startAngle: s.getView().startAngle,
77+
endAngle: s.getView().endAngle,
7678
name: s.getView().seriesName,
7779
selectedMode: "single",
7880
encode: {

client/packages/lowcoder-comps/src/comps/pieChartComp/seriesComp.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import {
22
BoolControl,
33
StringControl,
44
list,
5+
withDefault,
6+
NumberControl,
57
isNumeric,
68
genRandomKey,
79
Dropdown,
@@ -61,6 +63,8 @@ export function newMarkArea(): MarkLineDataType {
6163
const seriesChildrenMap = {
6264
columnName: StringControl,
6365
seriesName: StringControl,
66+
startAngle: withDefault(NumberControl, 0),
67+
endAngle: withDefault(NumberControl, 360),
6468
hide: BoolControl,
6569
// unique key, for sort
6670
dataIndex: valueComp<string>(""),
@@ -89,6 +93,12 @@ class SeriesComp extends SeriesTmpComp {
8993
this.children.columnName.dispatchChangeValueAction(value);
9094
}}
9195
/>
96+
{this.children.startAngle.propertyView({
97+
label: trans("pieChart.startAngle"),
98+
})}
99+
{this.children.endAngle.propertyView({
100+
label: trans("pieChart.endAngle"),
101+
})}
92102
</>
93103
);
94104
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ export const en = {
345345
borderWidth: "Border Width",
346346
borderType: "Border Type",
347347
},
348+
pieChart: {
349+
startAngle: "Start Angle",
350+
endAngle: "End Angle",
351+
},
348352
barChart: {
349353
title: 'Title',
350354
barWidth: 'Bar Width(%)',

0 commit comments

Comments
 (0)