Skip to content

Commit 22f9550

Browse files
committed
candlestick chart config
1 parent 5b315c9 commit 22f9550

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import {
2+
BoolControl,
3+
MultiCompBuilder,
4+
showLabelPropertyView,
5+
} from "lowcoder-sdk";
6+
import { CandlestickSeriesOption } from "echarts";
7+
import { trans } from "i18n/comps";
8+
9+
export const CandleStickChartConfig = (function () {
10+
return new MultiCompBuilder(
11+
{
12+
showLabel: BoolControl,
13+
},
14+
(props): CandlestickSeriesOption => {
15+
const config: CandlestickSeriesOption = {
16+
type: "candlestick",
17+
label: {
18+
show: props.showLabel,
19+
position: "top",
20+
},
21+
};
22+
return config;
23+
}
24+
)
25+
.setPropertyViewFn((children) => (
26+
<>
27+
{showLabelPropertyView(children)}
28+
{children.type.propertyView({
29+
label: trans("candleStickChart.candleStickType"),
30+
radioButton: true,
31+
})}
32+
</>
33+
))
34+
.build();
35+
})();

0 commit comments

Comments
 (0)