Skip to content

Commit

Permalink
Changed Align order on Funnel chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Imiss-U1025 committed Dec 19, 2024
1 parent b74acba commit 76bd5ff
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import {FunnelSeriesOption, LegendComponentOption} from "echarts";
import { trans } from "i18n/comps";

const FunnelAlignOptions = [
{
label: <AlignLeft />,
value: "left",
},
{
label: <AlignClose />,
value: "center",
},
{
label: <AlignRight />,
value: "right",
},
{
label: <AlignLeft />,
value: "left",
},
}
] as const;

export const EchartsFunnelAlignConfig = (function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import { LegendComponentOption } from "echarts";
import { trans } from "i18n/comps";

const LabelPositionOptions = [
{
label: <AlignLeft />,
value: "left",
},
{
label: <AlignClose />,
value: "inside",
},
{
label: <AlignRight />,
value: "right",
},
{
label: <AlignLeft />,
value: "left",
},
}
] as const;

export const EchartsLabelConfig = (function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import { LegendComponentOption } from "echarts";
import { trans } from "i18n/comps";

const FunnelLegnedAlignOptions = [
{
label: <AlignLeft />,
value: "left",
},
{
label: <AlignClose />,
value: "center",
},
{
label: <AlignRight />,
value: "right",
},
{
label: <AlignLeft />,
value: "left",
},
}
] as const;

export const EchartsLegendAlignConfig = (function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
HorizontoalIcon,
HorizontalIcon,
VerticalIcon,
dropdownControl,
MultiCompBuilder,
Expand All @@ -9,7 +9,7 @@ import { trans } from "i18n/comps";

const LegendOrientOptions = [
{
label: <HorizontoalIcon />,
label: <HorizontalIcon />,
value: "horizontal",
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import { LegendComponentOption } from "echarts";
import { trans } from "i18n/comps";

const TitlePositionOptions = [
{
label: <AlignLeft />,
value: "left",
},
{
label: <AlignClose />,
value: "center",
},
{
label: <AlignRight />,
value: "right",
},
{
label: <AlignLeft />,
value: "left",
},
}
] as const;

export const EchartsTitleConfig = (function () {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { EchartsTitleConfig } from "comps/chartComp/chartConfigs/echartsTitleCon
import { EchartsSortingConfig } from "../chartComp/chartConfigs/echartsSortingConfig";
import { EchartsLegendAlignConfig } from "../chartComp/chartConfigs/echartsLegendAlignConfig";
import { EchartsLegendOrientConfig } from "../chartComp/chartConfigs/echartsLegendOrientConfig";
import { EchartsTitleVerticalConfig } from "../chartComp/chartConfigs/echartsTitleVerticalConfig";

export const ChartTypeOptions = [
{
Expand Down Expand Up @@ -266,7 +265,6 @@ let chartJsonModeChildren: any = {
echartsLegendAlignConfig: EchartsLegendAlignConfig,
echartsConfig: EchartsOptionComp,
echartsTitleConfig:EchartsTitleConfig,
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
// style: styleControl(EchartsStyle, 'style'),
tooltip: withDefault(BoolControl, true),
label: withDefault(BoolControl, true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function funnelChartPropertyView(
</div>
),
})}
{children.echartsTitleVerticalConfig.getPropertyView()}
{children.echartsTitleConfig.getPropertyView()}
{children.legendVisibility.getView() && children.echartsLegendConfig.getPropertyView()}
{children.legendVisibility.getView() && children.echartsLegendOrientConfig.getPropertyView()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,16 @@ export function getEchartsConfig(
chartSize?: ChartSize,
theme?: any,
): EChartsOptionWithMap {

console.log("props", props);
console.log("theme", theme);

const backgroundColor = props?.chartStyle?.chartBackgroundColor || theme?.chartStyle?.backgroundColor || "#FFFFFF";
const gradientColor = props?.chartStyle?.chartGradientColor || theme?.chartStyle?.gradientColor;
const opacity = props?.chartStyle?.chartOpacity || theme?.chartStyle?.opacity;
const direction = props?.chartStyle?.direction || theme?.chartStyle?.direction;

console.log("props", props);
console.log("theme", theme);

if (props.mode === "json") {
let opt={
"title": {
"text": props.echartsTitle,
'top': props.echartsTitleVerticalConfig.top,
'top': "top",
"left":props.echartsTitleConfig.top,
"textStyle": {
"fontFamily": props?.titleStyle?.chartFontFamily || theme?.titleStyle?.fontFamily,
Expand All @@ -175,7 +168,7 @@ export function getEchartsConfig(
"data": props.echartsOption.data?.map(data=>data.name),
"top": props.echartsLegendConfig.top,
"left": props.echartsLegendAlignConfig.left,
"orient": props.echartsLegendLayoutConfig.orient,
"orient": props.echartsLegendOrientConfig.orient,
"textStyle": {
"fontFamily": props?.legendStyle?.chartFontFamily || theme?.legendStyle?.fontFamily,
"fontSize": props?.legendStyle?.chartTextSize || theme?.legendStyle?.fontSize,
Expand Down

0 comments on commit 76bd5ff

Please sign in to comment.