Skip to content

Commit 185da1d

Browse files
committed
candlestick chart property view
1 parent b334ffc commit 185da1d

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import { CompAction } from "lowcoder-core";
2+
import { ChartCompChildrenType } from "./candleStickChartConstants";
3+
import {
4+
hiddenPropertyView,
5+
Section,
6+
sectionNames,
7+
} from "lowcoder-sdk";
8+
import { trans } from "i18n/comps";
9+
import { examplesUrl,optionUrl } from "../chartConfigs/chartUrls";
10+
11+
export function candleStickChartPropertyView(
12+
children: ChartCompChildrenType,
13+
dispatch: (action: CompAction) => void
14+
) {
15+
16+
const jsonModePropertyView = (
17+
<>
18+
<Section name={trans("chart.config")}>
19+
{children.echartsOption.propertyView({
20+
label: trans("chart.echartsOptionLabel"),
21+
styleName: "higher",
22+
tooltip: (
23+
<div>
24+
<a href={optionUrl} target="_blank" rel="noopener noreferrer">
25+
{trans("chart.echartsOptionTooltip")}
26+
</a>
27+
<br />
28+
<a href={examplesUrl} target="_blank" rel="noopener noreferrer">
29+
{trans("chart.echartsOptionExamples")}
30+
</a>
31+
</div>
32+
),
33+
})}
34+
{children.echartsTitle.propertyView({ label: trans("candleStickChart.title") })}
35+
{children.tooltip.propertyView({label: trans("candleStickChart.tooltip")})}
36+
</Section>
37+
<Section name={sectionNames.interaction}>
38+
{children.onEvent.propertyView()}
39+
</Section>
40+
<Section name={sectionNames.style}>
41+
{children.style.getPropertyView()}
42+
</Section>
43+
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
44+
</>
45+
);
46+
47+
const getChatConfigByMode = (mode: string) => {
48+
switch(mode) {
49+
case "json":
50+
return jsonModePropertyView;
51+
}
52+
}
53+
return getChatConfigByMode(children.mode.getView())
54+
}

0 commit comments

Comments
 (0)