Skip to content

Commit fee527e

Browse files
Theme: added comp theme styling in candleStickChart
1 parent 1938eb7 commit fee527e

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

client/packages/lowcoder-comps/src/comps/candleStickChartComp/candleStickChartComp.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ CandleStickChartTmpComp = withViewFn(CandleStickChartTmpComp, (comp) => {
6363
color: chartColorPalette,
6464
backgroundColor: "#fff",
6565
};
66-
6766
let themeConfig = defaultChartTheme;
6867
try {
6968
themeConfig = theme?.theme.chart ? JSON.parse(theme?.theme.chart) : defaultChartTheme;

client/packages/lowcoder-comps/src/comps/candleStickChartComp/candleStickChartConstants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ const chartJsonModeChildren = {
253253
echartsLegendConfig: EchartsLegendConfig,
254254
echartsLabelConfig: EchartsLabelConfig,
255255
echartsConfig: EchartsOptionComp,
256-
style: styleControl(EchartsStyle),
256+
style: styleControl(EchartsStyle, 'style'),
257257
tooltip: withDefault(BoolControl, true),
258258
legendVisibility: withDefault(BoolControl, true),
259259
}

client/packages/lowcoder-comps/src/comps/candleStickChartComp/candleStickChartUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function getEchartsConfig(
141141
'top': props.echartsLegendConfig.top === 'bottom' ?'top':'bottom',
142142
"left":"center"
143143
},
144-
"backgroundColor": props?.style?.background || theme.background,
144+
"backgroundColor": props?.style?.background || theme?.style?.background,
145145
"color": props.echartsOption.data?.map(data => data.color),
146146
"tooltip": props.tooltip&&{
147147
"trigger": "axis",

client/packages/lowcoder/src/comps/controls/styleControl.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,8 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
864864
const theme = useContext(ThemeContext);
865865
const bgColor = useContext(BackgroundColorContext);
866866

867-
const appSettingsComp = editorState.getAppSettingsComp();
868-
const { preventAppStylesOverwriting } = appSettingsComp.getView();
867+
const appSettingsComp = editorState?.getAppSettingsComp();
868+
const preventAppStylesOverwriting = appSettingsComp?.getView()?.preventAppStylesOverwriting;
869869
const { themeId } = theme || {};
870870
const { appliedThemeId, preventStyleOverwriting } = comp?.comp || {};
871871
const appTheme = !preventStyleOverwriting && !preventAppStylesOverwriting

client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
386386
</Card>
387387
</ThemeSettingsView>
388388

389-
{/* <ThemeSettingsView>
389+
<ThemeSettingsView>
390390
<StyleThemeSettingsCover>
391391
<TextSizeIcon width={"36px"} style={{marginRight : "10px"}}/> <h2 style={{color: "#ffffff", marginTop : "8px"}}> {trans("theme.fonts")}</h2>
392392
</StyleThemeSettingsCover>
@@ -425,7 +425,7 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
425425
<PreviewApp style={{marginTop: '3px', height: "620px", width: "100%"}} theme={this.state.theme} dsl={dsl} />
426426
</Flex>
427427
</Card>
428-
</ThemeSettingsView> */}
428+
</ThemeSettingsView>
429429

430430
<ThemeSettingsView>
431431
<StyleThemeSettingsCover>

0 commit comments

Comments
 (0)