Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remote Chart#1451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
FalkWolsky merged 9 commits intodevfromfeature-funnelChart
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
9 commits
Select commitHold shift + click to select a range
c7d4c9c
Fixed a Hook Function issue.
Imiss-U1025Jan 15, 2025
451a0f6
Fixed an issue that the theme is not applied because some properties …
Imiss-U1025Jan 15, 2025
00e61a2
Fixed candlestick and gauge chart to apply theme.
Imiss-U1025Jan 15, 2025
cf5ff04
Fixed basic, legancy, gauge charts to apply theme correctly.
Imiss-U1025Jan 15, 2025
712dae0
Added additional data input and moved options to Advanced.
Imiss-U1025Jan 16, 2025
ad00227
Completed the ability to input static/dynamic data via data fields ad…
Imiss-U1025Jan 16, 2025
3af9b02
Fixed the ability to input static/dynamic data via data fields added.
Imiss-U1025Jan 17, 2025
c2bd024
Fixed an issue where there are less than 10 workspaces displayed when…
Imiss-U1025Jan 17, 2025
9659cdf
Fixed some issues from candlestick charts and GeoMap.
Imiss-U1025Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -253,6 +253,7 @@ export const chartUiModeChildren = {
};

let chartJsonModeChildren: any = {
echartsData: jsonControl(toJSONObjectArray),
echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption),
echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")),
echartsLegendConfig: EchartsLegendConfig,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,9 +28,7 @@ export function chartPropertyView(
const uiModePropertyView = (
<>
<Section name={trans("chart.data")}>
{children.data.propertyView({
label: trans("chart.data"),
})}
{children.echartsData.propertyView({ label: trans("chart.data") })}
<Dropdown
value={children.chartConfig.children.compType.getView()}
options={ChartTypeOptions}
Expand DownExpand Up@@ -151,6 +149,11 @@ export function chartPropertyView(
<Section name={sectionNames.legendStyle}>
{children.legendStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.advanced}>
{children.data.propertyView({
label: trans("chart.data"),
})}
</Section>
</>
);

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -212,9 +212,7 @@ export function getEchartsConfig(
.map((s) => s.getView().columnName);
// y-axis is category and time, data doesn't need to aggregate
const transformedData =
yAxisConfig.type === "category" || yAxisConfig.type === "time"
? props.data
: transformData(props.data, props.xAxisKey, seriesColumnNames);
yAxisConfig.type === "category" || yAxisConfig.type === "time" ? props.echartsData.length && props.echartsData || props.data : transformData(props.echartsData.length && props.echartsData || props.data, props.xAxisKey, seriesColumnNames);
config = {
...config,
dataset: [
Expand All@@ -228,6 +226,9 @@ export function getEchartsConfig(
itemStyle: {
...series.itemStyle,
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
},
lineStyle: {
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
}
})),
};
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -140,13 +140,14 @@ CandleStickChartTmpComp = withViewFn(CandleStickChartTmpComp, (comp) => {
}, [onUIEvent]);

const echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren);
const childrenProps = childrenToProps(echartsConfigChildren);
const option = useMemo(() => {
return getEchartsConfig(
childrenToProps(echartsConfigChildren) as ToViewReturn<typeof echartsConfigChildren>,
childrenProps as ToViewReturn<typeof echartsConfigChildren>,
chartSize,
theme?.theme?.components?.candleStickChart || {},
themeConfig
);
}, [chartSize, ...Object.values(echartsConfigChildren)]);
}, [theme, childrenProps,chartSize, ...Object.values(echartsConfigChildren)]);

useEffect(() => {
comp.children.mapInstance.dispatch(changeValueAction(null, false))
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -250,6 +250,7 @@ export const chartUiModeChildren = {
};

let chartJsonModeChildren: any = {
echartsData: jsonControl(toObject),
echartsOption: jsonControl(toObject, i18nObjs.defaultCandleStickChartOption),
echartsTitle: withDefault(StringControl, trans("candleStickChart.defaultTitle")),
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
Expand All@@ -271,8 +272,8 @@ if (EchartCandleStickChartStyle && EchartDefaultTextStyle) {
...chartJsonModeChildren,
chartStyle: styleControl(EchartCandleStickChartStyle, 'chartStyle'),
titleStyle: styleControl(EchartDefaultTextStyle, 'titleStyle'),
labelStyle: styleControl(EchartDefaultTextStyle, 'labelStyle'),
legendStyle: styleControl(EchartDefaultTextStyle, 'legendStyle'),
xAxisStyle: styleControl(EchartDefaultTextStyle, 'xAxisStyle'),
yAxisStyle: styleControl(EchartDefaultTextStyle, 'yAxisStyle'),
}
}

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,21 +16,7 @@ export function candleStickChartPropertyView(
const jsonModePropertyView = (
<>
<Section name={trans("chart.config")}>
{children.echartsOption.propertyView({
label: trans("chart.echartsOptionLabel"),
styleName: "higher",
tooltip: (
<div>
<a href={optionUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionTooltip")}
</a>
<br />
<a href={examplesUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionExamples")}
</a>
</div>
),
})}
{children.echartsData.propertyView({ label: trans("chart.data") })}
{children.echartsTitleConfig.getPropertyView()}
{children.echartsTitleVerticalConfig.getPropertyView()}
{children.echartsTitle.propertyView({ label: trans("candleStickChart.title"), tooltip: trans("echarts.titleTooltip") })}
Expand All@@ -56,10 +42,27 @@ export function candleStickChartPropertyView(
{children.titleStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.xAxisStyle}>
{children.labelStyle?.getPropertyView()}
{children.xAxisStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.yAxisStyle}>
{children.legendStyle?.getPropertyView()}
{children.yAxisStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.advanced}>
{children.echartsOption.propertyView({
label: trans("chart.echartsOptionLabel"),
styleName: "higher",
tooltip: (
<div>
<a href={optionUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionTooltip")}
</a>
<br />
<a href={examplesUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionExamples")}
</a>
</div>
),
})}
</Section>
</>
);
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -149,7 +149,7 @@ export function getEchartsConfig(
}
},
backgroundColor: parseBackground( props?.chartStyle?.background || theme?.chartStyle?.backgroundColor || "#FFFFFF"),
color: props?.echartsOption.data?.map(data => data.color),
color: props?.echartsData.data?.map(data => data.color) || props?.echartsOption.data?.map(data => data.color),
tooltip: props?.tooltip && {
trigger: "axis",
axisPointer: {
Expand DownExpand Up@@ -178,25 +178,25 @@ export function getEchartsConfig(
splitArea: props?.axisFlagVisibility && {
show: true,
areaStyle: {
color: props?.echartsOption?.axisColor
color: props?.echartsData?.axisColor || props?.echartsOption?.axisColor
}
},
axisLabel: {
...styleWrapper(props?.legendStyle, theme?.legendStyle, 13),
...styleWrapper(props?.yAxisStyle, theme?.yAxisStyle, 13),
}
},
xAxis: props?.echartsOption && {
type: 'category',
data: props?.echartsOption.xAxis && props?.echartsOption.xAxis.data,
data:props?.echartsData.xAxis && props?.echartsData.xAxis.data || props?.echartsOption.xAxis && props?.echartsOption.xAxis.data,
splitArea: !props?.axisFlagVisibility && {
show: true,
areaStyle: {
// Provide multiple colors to alternate through
color: props?.echartsOption?.axisColor
color: props?.echartsData?.axisColor || props?.echartsOption?.axisColor
},
},
axisLabel: {
...styleWrapper(props?.labelStyle, theme?.labelStyle, 13),
...styleWrapper(props?.xAxisStyle, theme?.xAxisStyle, 13),
},
boundaryGap: true,
// Turn off x-axis split lines if desired, so you only see colored areas
Expand All@@ -205,16 +205,25 @@ export function getEchartsConfig(
},
// Show split areas, each day with a different background color
},
series:props?.echartsOption && [
series: props?.echartsOption && [
{
name: props?.echartsConfig.type,
type: props?.echartsConfig.type,
label: {
show: true,
position: props?.echartsLabelConfig.top
},
data: props?.echartsOption.data,
itemStyle: {
data: props?.echartsData?.data || props?.echartsOption.data,
itemStyle: props?.echartsData.itemStyle ? {
...props?.echartsData.itemStyle,
borderWidth: props?.chartStyle?.chartBorderWidth || theme?.chartStyle?.borderWidth,
borderType: props?.chartStyle?.chartBorderStyle || theme?.chartStyle?.borderType,
borderRadius: Number(props?.chartStyle?.chartBorderRadius || theme?.chartStyle?.borderRadius),
shadowColor: props?.chartStyle?.chartShadowColor || theme?.chartStyle?.shadowColor,
shadowBlur: props?.chartStyle?.chartBoxShadow?.split('px')[0] || theme?.chartStyle?.boxShadow?.split('px')[0],
shadowOffsetX: props?.chartStyle?.chartBoxShadow?.split('px')[1] || theme?.chartStyle?.boxShadow?.split('px')[1],
shadowOffsetY: props?.chartStyle?.chartBoxShadow?.split('px')[2] || theme?.chartStyle?.boxShadow?.split('px')[2]
} : {
...props?.echartsOption.itemStyle,
borderWidth: props?.chartStyle?.chartBorderWidth || theme?.chartStyle?.borderWidth,
borderType: props?.chartStyle?.chartBorderStyle || theme?.chartStyle?.borderType,
Expand All@@ -227,7 +236,7 @@ export function getEchartsConfig(
},
],
}
return props.echartsOption ? opt : {};
return props.echartsData || props.echartsOption ? opt : {};

}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -156,13 +156,14 @@ ChartTmpComp = withViewFn(ChartTmpComp, (comp) => {
}, [mode, onUIEvent]);

const echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren);
const childrenProps = childrenToProps(echartsConfigChildren);
const option = useMemo(() => {
return getEchartsConfig(
childrenToProps(echartsConfigChildren) as ToViewReturn<typeof echartsConfigChildren>,
childrenProps as ToViewReturn<typeof echartsConfigChildren>,
chartSize,
themeConfig
);
}, [chartSize, ...Object.values(echartsConfigChildren)]);
}, [theme, childrenProps,chartSize, ...Object.values(echartsConfigChildren)]);

const isMapScriptLoaded = useMemo(() => {
return mapScriptLoaded || window?.google;
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -263,6 +263,7 @@ export const chartUiModeChildren = {
};

let chartJsonModeChildren: any = {
echartsData: jsonControl(toJSONObjectArray),
echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")),
echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption),

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,9 +27,7 @@ export function chartPropertyView(
const uiModePropertyView = (
<>
<Section name={trans("chart.data")}>
{children.data.propertyView({
label: trans("chart.data"),
})}
{children.echartsData.propertyView({ label: trans("chart.data") })}
<Dropdown
value={children.chartConfig.children.compType.getView()}
options={ChartTypeOptions}
Expand DownExpand Up@@ -151,6 +149,11 @@ export function chartPropertyView(
<Section name={sectionNames.legendStyle}>
{children.legendStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.advanced}>
{children.data.propertyView({
label: trans("chart.data"),
})}
</Section>
</>
);

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -136,7 +136,7 @@ export function getEchartsConfig(
theme?: any,
): EChartsOptionWithMap {
if (props.mode === "json") {
return props.echartsOption ? props.echartsOption : {};
return props.echartsOption|| props.echartsOption? props.echartsOption : {};
}
if(props.mode === "map") {
const {
Expand DownExpand Up@@ -181,7 +181,7 @@ export function getEchartsConfig(
...props.legendConfig,
textStyle: {
...styleWrapper(props?.legendStyle, theme?.legendStyle, 15)
}
},
},
tooltip: props.tooltip&&{
trigger: "axis",
Expand DownExpand Up@@ -212,9 +212,7 @@ export function getEchartsConfig(
.map((s) => s.getView().columnName);
// y-axis is category and time, data doesn't need to aggregate
const transformedData =
yAxisConfig.type === "category" || yAxisConfig.type === "time"
? props.data
: transformData(props.data, props.xAxisKey, seriesColumnNames);
yAxisConfig.type === "category" || yAxisConfig.type === "time" ? props.echartsData.length && props.echartsData || props.data : transformData(props.echartsData.length && props.echartsData || props.data, props.xAxisKey, seriesColumnNames);
config = {
...config,
dataset: [
Expand All@@ -228,6 +226,9 @@ export function getEchartsConfig(
itemStyle: {
...series.itemStyle,
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
},
lineStyle: {
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
}
})),
};
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,13 +116,14 @@ MapTmpComp = withViewFn(MapTmpComp, (comp) => {
}, [mapScriptLoaded]);

const echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren);
const childrenProps = childrenToProps(echartsConfigChildren);
const option = useMemo(() => {
return getEchartsConfig(
childrenToProps(echartsConfigChildren) as ToViewReturn<typeof echartsConfigChildren>,
childrenProps as ToViewReturn<typeof echartsConfigChildren>,
chartSize,
theme?.theme?.components?.candleStickChart || {},
);
}, [chartSize, ...Object.values(echartsConfigChildren)]);
}, [theme, childrenProps,chartSize, ...Object.values(echartsConfigChildren)]);

const isMapScriptLoaded = useMemo(() => {
return mapScriptLoaded || window?.google;
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -141,13 +141,14 @@ FunnelChartTmpComp = withViewFn(FunnelChartTmpComp, (comp) => {
}, [onUIEvent]);

let echartsConfigChildren = _.omit(comp.children, echartsConfigOmitChildren);
const childrenProps = childrenToProps(echartsConfigChildren);
const option = useMemo(() => {
return getEchartsConfig(
childrenToProps(echartsConfigChildren) as ToViewReturn<typeof echartsConfigChildren>,
childrenProps as ToViewReturn<typeof echartsConfigChildren>,
chartSize,
themeConfig,
);
}, [chartSize, ...Object.values(echartsConfigChildren), theme]);
}, [theme, childrenProps,chartSize, ...Object.values(echartsConfigChildren)]);

useEffect(() => {
comp.children.mapInstance.dispatch(changeValueAction(null, false))
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -255,6 +255,7 @@ export const chartUiModeChildren = {
};

let chartJsonModeChildren: any = {
echartsData: jsonControl(toObject),
echartsOption: jsonControl(toObject, i18nObjs.defaultFunnelChartOption),
echartsTitle: withDefault(StringControl, trans("funnelChart.defaultTitle")),
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,21 +16,8 @@ export function funnelChartPropertyView(
const jsonModePropertyView = (
<>
<Section name={trans("chart.config")}>
{children.echartsOption.propertyView({
label: trans("chart.echartsOptionLabel"),
styleName: "higher",
tooltip: (
<div>
<a href={optionUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionTooltip")}
</a>
<br />
<a href={examplesUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionExamples")}
</a>
</div>
),
})}
{children.echartsData.propertyView({ label: trans("chart.data") })}

{children.echartsTitleConfig.getPropertyView()}
{children.echartsTitleVerticalConfig.getPropertyView()}
{children.legendVisibility.getView() && children.echartsLegendAlignConfig.getPropertyView()}
Expand DownExpand Up@@ -74,6 +61,23 @@ export function funnelChartPropertyView(
</Section> : <></>
}
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
<Section name={sectionNames.advanced}>
{children.echartsOption.propertyView({
label: trans("chart.echartsOptionLabel"),
styleName: "higher",
tooltip: (
<div>
<a href={optionUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionTooltip")}
</a>
<br />
<a href={examplesUrl} target="_blank" rel="noopener noreferrer">
{trans("chart.echartsOptionExamples")}
</a>
</div>
),
})}
</Section>
</>
);

Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp