Skip to content

Dev -> Main v2.6 #1458

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 128 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
b9956bc
added input format option in date/dateRange picker and table's date/d…
raheeliftikhar5 Dec 26, 2024
d3523c1
added input format option in calendar comp
raheeliftikhar5 Dec 26, 2024
3eafcd5
Fixed background Color and built type structure of gauge chart.
Imiss-U1025 Dec 20, 2024
bb1d2b5
Added Stage Speed Gauge, Grade Gauge, Temperature Gauge chart, Multi …
Imiss-U1025 Dec 20, 2024
4c790a7
Fixed Conditional statements.
Imiss-U1025 Dec 20, 2024
bbdcfe7
Added Stage clock to gauge chart(not editing).
Imiss-U1025 Dec 20, 2024
da4216e
Added dataZoom, grid to candleStick chart.
Imiss-U1025 Dec 20, 2024
a06f57a
Added an editing ability on Stage Gauge chart.
Imiss-U1025 Dec 23, 2024
67c0472
Added an editing ability on Grade Gauge chart.
Imiss-U1025 Dec 24, 2024
7209f93
Added an editing ability on Temperature Gauge chart.
Imiss-U1025 Dec 25, 2024
8c23506
Fixed an editing ability on Temperature Gauge chart.
Imiss-U1025 Dec 26, 2024
5d7020c
Fixed an editing ability on Multi Title and Ring chart.
Imiss-U1025 Dec 26, 2024
ab040d8
Converted repetitive control fields to JSON option, optimize and clea…
Imiss-U1025 Dec 27, 2024
c87b7b3
Fixed an editing ability on Clock chart.
Imiss-U1025 Dec 28, 2024
186aa15
Fixed Clock Pointer Icons on Clock Chart.
Imiss-U1025 Dec 28, 2024
d7e5a2d
Fixed an editing ability on Barometer chart.
Imiss-U1025 Dec 28, 2024
6056207
Fixed some issues and added border and detailSize to Detail Style.
Imiss-U1025 Dec 30, 2024
3d30bad
Fixed a border Radius on styleWrapper.
Imiss-U1025 Dec 30, 2024
0531190
Fixed tooltip and formatters on all gauge chart
Imiss-U1025 Dec 30, 2024
e16d918
slug validation
dragonpoo Dec 20, 2024
11e825a
search by slugs
dragonpoo Dec 20, 2024
f6a5890
Fix an issue returning wrong message with duplicated slug
dragonpoo Dec 24, 2024
9d16acb
resolved an issue causing the app DSL to fail to save intermittently
raheeliftikhar5 Dec 31, 2024
6e090b5
upgrade lowcoder-comps version to 2.5.5
raheeliftikhar5 Dec 31, 2024
b0078ef
Merge branch 'dev' into feature-funnelChart
raheeliftikhar5 Dec 31, 2024
25cb060
Merge pull request #1393 from lowcoder-org/feature-funnelChart
raheeliftikhar5 Dec 31, 2024
dd9dbf2
upgrade version for lowcoder-comps
raheeliftikhar5 Dec 31, 2024
8b13735
fixed floatingButton and autoComplete comps loading issue in componen…
raheeliftikhar5 Jan 1, 2025
f381f79
added examples for multiple components
adnanqaops Jan 1, 2025
405537d
fixed iconButton comp
raheeliftikhar5 Jan 1, 2025
9726857
fixed component docs for iconComp
raheeliftikhar5 Jan 1, 2025
9e0b8ea
fixed calendar exposing functions
raheeliftikhar5 Jan 2, 2025
5f0187c
fixed calendar's event list view
raheeliftikhar5 Jan 2, 2025
c02f94b
upgrade lowcoder-comps version
raheeliftikhar5 Jan 2, 2025
1a3d073
added switch to show resource events in free view
raheeliftikhar5 Jan 3, 2025
96b90e8
added public app editor
raheeliftikhar5 Jan 3, 2025
af394ac
fixed datasrouces, npm plugings, js plugins for public app editor
raheeliftikhar5 Jan 6, 2025
96cbee6
added feature to export public app
raheeliftikhar5 Jan 6, 2025
dcd76c3
Fix chart loading issue
dragonpoo Jan 7, 2025
47c101b
added examples for different components
adnanqaops Jan 8, 2025
4d8148e
Rename collection `applicationRecord` to `applicationVersion`
dragonpoo Jan 8, 2025
d993b6c
Replace value of gid and organization id in API response
dragonpoo Jan 8, 2025
7553286
Merge pull request #1425 from lowcoder-org/public_app_editor
FalkWolsky Jan 9, 2025
827958b
added showDataLoadingIndicator property in UICompBuilder
raheeliftikhar5 Jan 9, 2025
07538e2
added showDataLoadingIndicator property view in comps
raheeliftikhar5 Jan 9, 2025
86183fd
show loading based on showDataLoadingIndicator flag
raheeliftikhar5 Jan 9, 2025
54380cb
added data loading indicator types(skeleton/spinner) in theme settings
raheeliftikhar5 Jan 9, 2025
84393c8
Merge pull request #1434 from lowcoder-org/feat/loading-indicators
FalkWolsky Jan 9, 2025
e04598d
added different examples for multiple components
adnanqaops Jan 10, 2025
3f78a0a
Merge pull request #1435 from lowcoder-org/doc/existing_components
FalkWolsky Jan 10, 2025
749a722
Small fix to remove unreachable code
Jan 11, 2025
02d04c0
Image Conponent Enhancements v1
Jan 11, 2025
b01612c
Adding Tooltips for StyleControls and update Language Files
Jan 11, 2025
e45d6cd
fixed showDataLoadingIndicator error on charts
raheeliftikhar5 Jan 11, 2025
9311e81
Removing LowcoderAPI as AdHoc DataSource
Jan 11, 2025
c75bbe7
Added control fields and style fields on CandleStick charts.
Imiss-U1025 Jan 3, 2025
5fb1fc0
Added Tooltip to CandleStick chart.
Imiss-U1025 Jan 3, 2025
31ddc52
Added control fields and style fields on Graph charts.
Imiss-U1025 Jan 3, 2025
319a002
Added control fields and style fields to heatmap charts.
Imiss-U1025 Jan 6, 2025
5e37980
Added control fields and style fields to radar charts
Imiss-U1025 Jan 7, 2025
a1a817a
Added control fields and style fields to sankey charts
Imiss-U1025 Jan 7, 2025
113bd65
Added isColorString.ts, and fixed an issue that put incorrect color.
Imiss-U1025 Jan 7, 2025
537ca0b
Added control fields and style fields to themeriver charts
Imiss-U1025 Jan 7, 2025
dc5dc71
Fixed an issue thant chart break when JSON data is invalid.
Imiss-U1025 Jan 8, 2025
86a66a1
Changed theme river's language file.
Imiss-U1025 Jan 8, 2025
09f2c33
Added control fields and style fields to sunburst charts.
Imiss-U1025 Jan 8, 2025
763d979
Added control fields and style fields to tree charts.
Imiss-U1025 Jan 9, 2025
8fae70f
Added control fields and style fields to treemap charts.
Imiss-U1025 Jan 9, 2025
5b12115
Added control fields and style fields to Basic and Legacy charts.
Imiss-U1025 Jan 10, 2025
2a11136
Added legendConfig to Basic and Legacy charts.
Imiss-U1025 Jan 10, 2025
ab19a36
Tested to all charts and Fixed any issues I find.
Imiss-U1025 Jan 11, 2025
84f3285
Adding Display to show where queries are used
Jan 11, 2025
969202a
Merge branch 'dev' into feature-funnelChart
FalkWolsky Jan 11, 2025
85c50d7
Merge pull request #1436 from lowcoder-org/feature-funnelChart
FalkWolsky Jan 11, 2025
f2dfe85
Increasing Version Numbers for Release
Jan 11, 2025
b134ab1
Updating Yarn Lock for Node-Service
Jan 11, 2025
94b19a0
Small Fixes and SDK Version increase
Jan 11, 2025
22bcdf1
Layout optimisation for Query Usage List
Jan 12, 2025
7006f73
New Lowcoder Comps
Jan 12, 2025
735b83e
Merge pull request #1428 from lowcoder-org/fix/gid_organization_id
FalkWolsky Jan 12, 2025
a5c1aad
Merge pull request #1429 from lowcoder-org/fix/rename_collection
FalkWolsky Jan 12, 2025
47d65d7
#1331: added folder Id to all applicationInfoViews
dragonpoo Jan 13, 2025
62b795b
Add localeContextResolver using lang query param
dragonpoo Jan 9, 2025
9336cbb
make en_US as a default if lang is empty.
dragonpoo Jan 13, 2025
ed7790d
Updating Node-Service dependencies
Jan 13, 2025
d43d0aa
Merge pull request #1439 from lowcoder-org/fix/folderid_null
FalkWolsky Jan 13, 2025
4ced9ee
Fix migration of snapshot history
dragonpoo Jan 14, 2025
e71bd32
added onInputChange and onPageLoad triggers in query
raheeliftikhar5 Jan 13, 2025
fb3a52c
added onQueryExecution trigger in query
raheeliftikhar5 Jan 13, 2025
85bc2db
removed import
raheeliftikhar5 Jan 13, 2025
ed12206
added onTimeout trigger on query
raheeliftikhar5 Jan 14, 2025
9ce2172
Added onInputChange, onQueryExecution and onTimeout triggers on JS/St…
raheeliftikhar5 Jan 14, 2025
8d0eaa9
Merge pull request #1443 from lowcoder-org/feat/query_triggers
FalkWolsky Jan 14, 2025
f4e4a88
fixed hooks warning in basic chart comp
raheeliftikhar5 Jan 15, 2025
902fe26
Optional Hiding Table Toolbar
Jan 15, 2025
f65005a
added trigger mode option in dropdown comp
raheeliftikhar5 Jan 15, 2025
dfb4fec
added popup styles for date/time pickers
raheeliftikhar5 Jan 15, 2025
e5d8765
added missing translations
raheeliftikhar5 Jan 15, 2025
2100027
Publishing new Lowcoder Comps Version
Jan 15, 2025
5ba4f59
check input field validation on customRule's value change
raheeliftikhar5 Jan 16, 2025
052374a
added input format option for time/time range comps
raheeliftikhar5 Jan 16, 2025
5738280
add deploymentid into events published
dragonpoo Jan 16, 2025
3e3c39c
added picker modes in date/date range comps
raheeliftikhar5 Jan 17, 2025
7d8efc0
fixed transfer comp
raheeliftikhar5 Jan 17, 2025
7149282
Merge pull request #1447 from lowcoder-org/feature/deploymentid
FalkWolsky Jan 17, 2025
ba03d3b
Translations for Trigger Types
Jan 17, 2025
c7d4c9c
Fixed a Hook Function issue.
Imiss-U1025 Jan 15, 2025
451a0f6
Fixed an issue that the theme is not applied because some properties …
Imiss-U1025 Jan 15, 2025
00e61a2
Fixed candlestick and gauge chart to apply theme.
Imiss-U1025 Jan 15, 2025
cf5ff04
Fixed basic, legancy, gauge charts to apply theme correctly.
Imiss-U1025 Jan 15, 2025
712dae0
Added additional data input and moved options to Advanced.
Imiss-U1025 Jan 16, 2025
ad00227
Completed the ability to input static/dynamic data via data fields ad…
Imiss-U1025 Jan 16, 2025
3af9b02
Fixed the ability to input static/dynamic data via data fields added.
Imiss-U1025 Jan 17, 2025
c2bd024
Fixed an issue where there are less than 10 workspaces displayed when…
Imiss-U1025 Jan 17, 2025
9659cdf
Fixed some issues from candlestick charts and GeoMap.
Imiss-U1025 Jan 17, 2025
ec01a66
Merge pull request #1451 from lowcoder-org/feature-funnelChart
FalkWolsky Jan 19, 2025
a1e65fc
New Lowcoder Comps version
Jan 19, 2025
f70cce8
Converted input data JSON to Array.
Imiss-U1025 Jan 20, 2025
55503fc
Merge pull request #1452 from lowcoder-org/feature-DynamicData
FalkWolsky Jan 20, 2025
fc897d2
New Lowcoder Comps version in preparation to release 2.6
Jan 20, 2025
c3068a6
added data-testid for checkbox on signup page
raheeliftikhar5 Jan 20, 2025
fac8dd6
Rename deploymentID to environmentId
dragonpoo Jan 22, 2025
c08019a
added alasql and expose in JS
raheeliftikhar5 Jan 20, 2025
8c7348a
added alasql query comp
raheeliftikhar5 Jan 22, 2025
3a4ab7c
added alasql query in editor query panel
raheeliftikhar5 Jan 22, 2025
10c17e2
Merge pull request #1457 from lowcoder-org/feat/alasql
FalkWolsky Jan 22, 2025
198b5c3
Merge pull request #1456 from lowcoder-org/environment
FalkWolsky Jan 22, 2025
2112ea4
New Lowcoder Version 2.6 Release preparation
Jan 22, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.3
2.6.0
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-frontend",
"version": "2.5.0",
"version": "2.6.0",
"type": "module",
"private": true,
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-comps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-comps",
"version": "2.5.4",
"version": "2.6.1",
"type": "module",
"license": "MIT",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
echartsConfigOmitChildren,
getEchartsConfig,
getSelectedPoints,
} from "comps/chartComp/chartUtils";
} from "./chartUtils";
import 'echarts-extension-gmap';
import log from "loglevel";

Expand Down Expand Up @@ -120,13 +120,16 @@ BasicChartTmpComp = withViewFn(BasicChartTmpComp, (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)]);
}, [childrenProps, chartSize, ...Object.values(echartsConfigChildren)]);

useEffect(() => {
comp.children.mapInstance.dispatch(changeValueAction(null, false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import {
uiChildren,
clickEvent,
styleControl,
EchartsStyle
EchartDefaultTextStyle,
EchartDefaultChartStyle,
toArray
} from "lowcoder-sdk";
import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core";
import { BarChartConfig } from "./chartConfigs/barChartConfig";
Expand All @@ -32,6 +34,8 @@ import { EChartsOption } from "echarts";
import { i18nObjs, trans } from "i18n/comps";
import { GaugeChartConfig } from "./chartConfigs/gaugeChartConfig";
import { FunnelChartConfig } from "./chartConfigs/funnelChartConfig";
import {EchartsTitleVerticalConfig} from "../chartComp/chartConfigs/echartsTitleVerticalConfig";
import {EchartsTitleConfig} from "../chartComp/chartConfigs/echartsTitleConfig";

export const ChartTypeOptions = [
{
Expand Down Expand Up @@ -237,7 +241,7 @@ const EchartsOptionComp = withType(EchartsOptionMap, "funnel");
export type CharOptionCompType = keyof typeof ChartOptionMap;

export const chartUiModeChildren = {
title: StringControl,
title: withDefault(StringControl, trans("echarts.defaultTitle")),
data: jsonControl(toJSONObjectArray, i18nObjs.defaultDataSource),
xAxisKey: valueComp<string>(""), // x-axis, key from data
xAxisDirection: dropdownControl(XAxisDirectionOptions, "horizontal"),
Expand All @@ -250,19 +254,31 @@ export const chartUiModeChildren = {
};

let chartJsonModeChildren: any = {
echartsData: jsonControl(toArray),
echartsOption: jsonControl(toObject, i18nObjs.defaultEchartsJsonOption),
echartsTitle: withDefault(StringControl, trans("echarts.defaultTitle")),
echartsLegendConfig: EchartsLegendConfig,
echartsLabelConfig: EchartsLabelConfig,
echartsConfig: EchartsOptionComp,
// style: styleControl(EchartsStyle, 'style'),
echartsTitleVerticalConfig: EchartsTitleVerticalConfig,
echartsTitleConfig:EchartsTitleConfig,

left:withDefault(NumberControl,trans('chart.defaultLeft')),
right:withDefault(NumberControl,trans('chart.defaultRight')),
top:withDefault(NumberControl,trans('chart.defaultTop')),
bottom:withDefault(NumberControl,trans('chart.defaultBottom')),

tooltip: withDefault(BoolControl, true),
legendVisibility: withDefault(BoolControl, true),
}
if (EchartsStyle) {
if (EchartDefaultChartStyle && EchartDefaultTextStyle) {
chartJsonModeChildren = {
...chartJsonModeChildren,
style: styleControl(EchartsStyle, 'style'),
chartStyle: styleControl(EchartDefaultChartStyle, 'chartStyle'),
titleStyle: styleControl(EchartDefaultTextStyle, 'titleStyle'),
xAxisStyle: styleControl(EchartDefaultTextStyle, 'xAxis'),
yAxisStyle: styleControl(EchartDefaultTextStyle, 'yAxisStyle'),
legendStyle: styleControl(EchartDefaultTextStyle, 'legendStyle'),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "lowcoder-sdk";
import { trans } from "i18n/comps";
import { examplesUrl, mapExamplesUrl, mapOptionUrl, optionUrl } from "./chartConfigs/chartUrls";
import {LegendConfig} from "./chartConfigs/legendConfig";

export function chartPropertyView(
children: ChartCompChildrenType,
Expand All @@ -27,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 Down Expand Up @@ -114,7 +113,14 @@ export function chartPropertyView(
</div>
</Section>
<Section name={sectionNames.layout}>
{children.echartsTitleConfig.getPropertyView()}
{children.echartsTitleVerticalConfig.getPropertyView()}
{children.legendConfig.getPropertyView()}
{children.title.propertyView({ label: trans("chart.title") })}
{children.left.propertyView({ label: trans("chart.left"), tooltip: trans("echarts.leftTooltip") })}
{children.right.propertyView({ label: trans("chart.right"), tooltip: trans("echarts.rightTooltip") })}
{children.top.propertyView({ label: trans("chart.top"), tooltip: trans("echarts.topTooltip") })}
{children.bottom.propertyView({ label: trans("chart.bottom"), tooltip: trans("echarts.bottomTooltip") })}
{children.chartConfig.children.compType.getView() !== "pie" && (
<>
{children.xAxisDirection.propertyView({
Expand All @@ -125,10 +131,29 @@ export function chartPropertyView(
{children.yConfig.getPropertyView()}
</>
)}
{children.legendConfig.getPropertyView()}
{hiddenPropertyView(children)}
{children.tooltip.propertyView({label: trans("echarts.tooltip"), tooltip: trans("echarts.tooltipTooltip")})}
</Section>
<Section name={sectionNames.chartStyle}>
{children.chartStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.titleStyle}>
{children.titleStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.xAxisStyle}>
{children.xAxisStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.yAxisStyle}>
{children.yAxisStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.legendStyle}>
{children.legendStyle?.getPropertyView()}
</Section>
<Section name={sectionNames.advanced}>
{children.data.propertyView({
label: trans("chart.data"),
})}
</Section>
<Section name={sectionNames.style}>{children.chartConfig.getPropertyView()}</Section>
</>
);

Expand Down
114 changes: 58 additions & 56 deletions client/packages/lowcoder-comps/src/comps/basicChartComp/chartUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { chartColorPalette, isNumeric, JSONObject, loadScript } from "lowcoder-s
import { calcXYConfig } from "comps/chartComp/chartConfigs/cartesianAxisConfig";
import Big from "big.js";
import { googleMapsApiUrl } from "./chartConfigs/chartUrls";
import {chartStyleWrapper, styleWrapper} from "../../util/styleWrapper";
import parseBackground from "../../util/gradientBackgroundColor";

export function transformData(
originData: JSONObject[],
Expand Down Expand Up @@ -134,52 +136,15 @@ export function getEchartsConfig(
theme?: any,
): EChartsOptionWithMap {
if (props.mode === "json") {
let opt={
"title": {
"text": props.echartsTitle,
'top': props.echartsLegendConfig.top === 'bottom' ?'top':'bottom',
"left":"center"
},
"backgroundColor": props?.style?.background || theme?.style?.background,
"color": props.echartsOption.data?.map(data => data.color),
"tooltip": props.tooltip && {
"trigger": "item",
"formatter": "{a} <br/>{b} : {c}%"
},
"legend":props.legendVisibility&& {
"data": props.echartsOption.data?.map(data=>data.name),
"top": props.echartsLegendConfig.top,
},
"series": [
{
"name": props.echartsConfig.type,
"type": props.echartsConfig.type,
"left": "10%",
"top": 60,
"bottom": 60,
"width": "80%",
"min": 0,
"max": 100,
"gap": 2,
"label": {
"show": true,
"position": props.echartsLabelConfig.top
},
"data": props.echartsOption.data
}
]
}
return props.echartsOption ? opt : {};

return props.echartsOption ? props.echartsOption : {};
}

if(props.mode === "map") {
const {
mapZoomLevel,
mapCenterLat,
mapCenterLng,
mapOptions,
showCharts,
mapOptions,
showCharts,
} = props;

const echartsOption = mapOptions && showCharts ? mapOptions : {};
Expand All @@ -197,18 +162,38 @@ export function getEchartsConfig(
// axisChart
const axisChart = isAxisChart(props.chartConfig.type);
const gridPos = {
left: 20,
right: props.legendConfig.left === "right" ? "10%" : 20,
top: 50,
bottom: 35,
left: `${props?.left}%`,
right: `${props?.right}%`,
bottom: `${props?.bottom}%`,
top: `${props?.top}%`,
};
let config: EChartsOptionWithMap = {
title: { text: props.title, left: "center" },
tooltip: {
confine: true,
trigger: axisChart ? "axis" : "item",
let config: any = {
title: {
text: props.title,
top: props.echartsTitleVerticalConfig.top,
left:props.echartsTitleConfig.top,
textStyle: {
...styleWrapper(props?.titleStyle, theme?.titleStyle)
}
},
backgroundColor: parseBackground( props?.chartStyle?.background || theme?.chartStyle?.backgroundColor || "#FFFFFF"),
legend: {
...props.legendConfig,
textStyle: {
...styleWrapper(props?.legendStyle, theme?.legendStyle, 15)
}
},
tooltip: props.tooltip && {
trigger: "axis",
axisPointer: {
type: "line",
lineStyle: {
color: "rgba(0,0,0,0.2)",
width: 2,
type: "solid"
}
}
},
legend: props.legendConfig,
grid: {
...gridPos,
containLabel: true,
Expand All @@ -227,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 @@ -238,7 +221,16 @@ export function getEchartsConfig(
sourceHeader: false,
},
],
series: getSeriesConfig(props),
series: getSeriesConfig(props).map(series => ({
...series,
itemStyle: {
...series.itemStyle,
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
},
lineStyle: {
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
}
})),
};
if (axisChart) {
// pure chart's size except the margin around
Expand Down Expand Up @@ -266,9 +258,19 @@ export function getEchartsConfig(
config = {
...config,
// @ts-ignore
xAxis: finalXyConfig.xConfig,
xAxis: {
...finalXyConfig.xConfig,
axisLabel: {
...styleWrapper(props?.xAxisStyle, theme?.xAxisStyle, 11)
}
},
// @ts-ignore
yAxis: finalXyConfig.yConfig,
yAxis: {
...finalXyConfig.yConfig,
axisLabel: {
...styleWrapper(props?.yAxisStyle, theme?.yAxisStyle, 11)
}
},
};
}
// log.log("Echarts transformedData and config", transformedData, config);
Expand Down
Loading
Loading