Skip to content

Commit f39e135

Browse files
authored
Merge pull request #2248 from scottsut/master
Release 1.0.0-RC.3
2 parents f52621a + 11d5764 commit f39e135

File tree

72 files changed

+1118
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1118
-507
lines changed

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>datart-parent</artifactId>
77
<groupId>datart</groupId>
8-
<version>1.0.0-rc.2</version>
8+
<version>1.0.0-rc.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

data-providers/data-provider-base/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>datart-data-provider</artifactId>
77
<groupId>datart</groupId>
8-
<version>1.0.0-rc.2</version>
8+
<version>1.0.0-rc.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

data-providers/file-data-provider/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>datart-data-provider</artifactId>
77
<groupId>datart</groupId>
8-
<version>1.0.0-rc.2</version>
8+
<version>1.0.0-rc.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

data-providers/http-data-provider/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>datart-data-provider</artifactId>
77
<groupId>datart</groupId>
8-
<version>1.0.0-rc.2</version>
8+
<version>1.0.0-rc.3</version>
99
</parent>
1010

1111
<modelVersion>4.0.0</modelVersion>

data-providers/jdbc-data-provider/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>datart-data-provider</artifactId>
77
<groupId>datart</groupId>
8-
<version>1.0.0-rc.2</version>
8+
<version>1.0.0-rc.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

data-providers/jdbc-data-provider/src/main/java/datart/data/provider/jdbc/adapters/JdbcDataProviderAdapter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package datart.data.provider.jdbc.adapters;
2020

21+
import com.alibaba.fastjson.JSON;
2122
import datart.core.base.PageInfo;
2223
import datart.core.base.consts.ValueType;
2324
import datart.core.base.exception.Exceptions;
@@ -183,7 +184,7 @@ public Set<Column> readTableColumn(String database, String table) throws SQLExce
183184

184185
public String getQueryKey(QueryScript script, ExecuteParam executeParam) throws SqlParseException {
185186
SqlScriptRender render = new SqlScriptRender(script, executeParam, getSqlDialect(), jdbcProperties.isEnableSpecialSql(), driverInfo.getQuoteIdentifiers());
186-
return "Q" + DigestUtils.md5Hex(render.render(true, supportPaging(), true));
187+
return "Q" + DigestUtils.md5Hex(render.render(true, supportPaging(), true) + ";includeColumns:" + JSON.toJSONString(executeParam.getIncludeColumns()) + ";viewId:" + script.getViewId() + ";pageInfo:" + JSON.toJSONString(executeParam.getPageInfo()));
187188
}
188189

189190
protected Column readTableColumn(ResultSet columnMetadata) throws SQLException {
@@ -484,4 +485,4 @@ protected Object getObjFromResultSet(ResultSet rs, int columnIndex) throws SQLEx
484485
}
485486
return obj;
486487
}
487-
}
488+
}

data-providers/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>datart-parent</artifactId>
77
<groupId>datart</groupId>
8-
<version>1.0.0-rc.2</version>
8+
<version>1.0.0-rc.3</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

frontend/craco.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
chunkFilename: 'static/js/[name].[contenthash:8].js',
6262
},
6363
// path: path.resolve(__dirname, 'dist'), // 修改输出文件目录
64-
publicPath: '/',
64+
publicPath: `${process.env.PUBLIC_URL || ''}/`,
6565
};
6666
/**
6767
* webpack split chunks

frontend/src/app/AppRouter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import { ConfigProvider, message } from 'antd';
2020
import echartsDefaultTheme from 'app/assets/theme/echarts_default_theme.json';
2121
import { registerTheme } from 'echarts';
22-
import { StorageKeys } from 'globalConstants';
22+
import { PUBLIC_URL, StorageKeys } from 'globalConstants';
2323
import { antdLocales } from 'locales/i18n';
2424
import { useEffect, useLayoutEffect } from 'react';
2525
import { Helmet } from 'react-helmet-async';
@@ -65,7 +65,7 @@ export function AppRouter() {
6565

6666
return (
6767
<ConfigProvider locale={antdLocales[i18n.language]}>
68-
<BrowserRouter>
68+
<BrowserRouter basename={PUBLIC_URL}>
6969
<Helmet
7070
titleTemplate="%s - Datart"
7171
defaultTitle="Datart"

frontend/src/app/components/ChartDrill/ChartDrillContextMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const ChartDrillContextMenu: FC<{
8080
} else {
8181
rows = groupSection?.rows?.filter(v => v.uid === allFields[0].uid);
8282
}
83+
rows = rows?.filter(row => row.type === DataViewFieldType.DATE);
8384
return getRuntimeDateLevelFields(rows);
8485
}, [drillOption, chartConfig?.datas, currentFields]);
8586

frontend/src/app/components/ChartGraph/BasicBarChart/BasicBarChart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ class BasicBarChart extends Chart implements IChartLifecycle {
242242
return {
243243
tooltip: {
244244
trigger: 'item',
245+
confine: true,
245246
formatter: this.getTooltipFormatterFunc(
246247
chartDataSet,
247248
groupConfigs,

frontend/src/app/components/ChartGraph/BasicDoubleYChart/BasicDoubleYChart.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class BasicDoubleYChart extends Chart {
180180
axisPointer: {
181181
type: 'cross',
182182
},
183+
confine: true,
183184
formatter: this.getTooltipFormmaterFunc(
184185
styleConfigs,
185186
groupConfigs,
@@ -365,10 +366,10 @@ class BasicDoubleYChart extends Chart {
365366
);
366367

367368
const _yAxisTemplate = (position, name): DoubleYChartYAxis => {
368-
const [showAxis, inverse, font, showLabel] = getStyles(
369+
const [showAxis, inverse, font, showLabel, showTitleAndUnit] = getStyles(
369370
styles,
370371
[`${position}Y`],
371-
['showAxis', 'inverseAxis', 'font', 'showLabel'],
372+
['showAxis', 'inverseAxis', 'font', 'showLabel', 'showTitleAndUnit'],
372373
);
373374
const [format] = getStyles(
374375
styles,
@@ -379,7 +380,7 @@ class BasicDoubleYChart extends Chart {
379380
type: 'value',
380381
position,
381382
showTitleAndUnit: true,
382-
name,
383+
name: showTitleAndUnit ? name : null,
383384
nameLocation: 'middle',
384385
nameGap: 50,
385386
nameRotate: 90,

frontend/src/app/components/ChartGraph/BasicDoubleYChart/config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ const config: ChartConfig = {
253253
color: '#495057',
254254
},
255255
},
256+
{
257+
label: 'common.showTitleAndUnit',
258+
key: 'showTitleAndUnit',
259+
default: true,
260+
comType: 'checkbox',
261+
},
256262
{
257263
label: 'yAxis.open',
258264
key: 'modal',
@@ -331,6 +337,12 @@ const config: ChartConfig = {
331337
color: '#495057',
332338
},
333339
},
340+
{
341+
label: 'common.showTitleAndUnit',
342+
key: 'showTitleAndUnit',
343+
default: true,
344+
comType: 'checkbox',
345+
},
334346
{
335347
label: 'yAxis.open',
336348
key: 'modal',

frontend/src/app/components/ChartGraph/BasicLineChart/BasicLineChart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ class BasicLineChart extends Chart {
212212
return {
213213
tooltip: {
214214
trigger: 'item',
215+
confine: true,
215216
formatter: this.getTooltipFormmaterFunc(
216217
chartDataSet,
217218
groupConfigs,

frontend/src/app/components/ChartGraph/BasicOutlineMapChart/BasicOutlineMapChart.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,22 @@ class BasicOutlineMapChart extends Chart {
291291
areaEmphasisColor,
292292
enableFocus,
293293
borderStyle,
294+
roam,
294295
] = getStyles(
295296
styleConfigs,
296297
['map'],
297-
['level', 'areaColor', 'areaEmphasisColor', 'focusArea', 'borderStyle'],
298+
[
299+
'level',
300+
'areaColor',
301+
'areaEmphasisColor',
302+
'focusArea',
303+
'borderStyle',
304+
'roam',
305+
],
298306
);
299307
return {
300308
map: mapLevelName,
301-
roam: 'move',
309+
roam: roam && 'move',
302310
emphasis: {
303311
focus: enableFocus ? 'self' : 'none',
304312
itemStyle: {

frontend/src/app/components/ChartGraph/BasicPieChart/BasicPieChart.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,11 @@ class BasicPieChart extends Chart {
243243
}
244244

245245
private getPieSeriesImpl(styleConfigs: ChartStyleConfig[]): PieSeriesImpl {
246+
const [avoidOverlap] = getStyles(styleConfigs, ['label'], ['avoidOverlap']);
246247
return {
247248
type: 'pie',
248249
sampling: 'average',
249-
avoidLabelOverlap: false,
250+
avoidLabelOverlap: avoidOverlap,
250251
...this.getLabelStyle(styleConfigs),
251252
...this.getSeriesStyle(styleConfigs),
252253
...getGridStyle(styleConfigs),

frontend/src/app/components/ChartGraph/BasicPieChart/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ const config: ChartConfig = {
111111
default: true,
112112
comType: 'checkbox',
113113
},
114+
{
115+
label: 'label.avoidOverlap',
116+
key: 'avoidOverlap',
117+
default: false,
118+
comType: 'checkbox',
119+
},
114120
],
115121
},
116122
{
@@ -284,6 +290,7 @@ const config: ChartConfig = {
284290
showName: '维度值',
285291
showPercent: '百分比',
286292
showValue: '指标值',
293+
avoidOverlap: '强制显示所有标签',
287294
},
288295
legend: {
289296
title: '图例',
@@ -333,6 +340,7 @@ const config: ChartConfig = {
333340
showName: 'Show Name',
334341
showPercent: 'Show Percentage',
335342
showValue: 'Show Value',
343+
avoidOverlap: 'Force display of all labels',
336344
},
337345
legend: {
338346
title: 'Legend',

frontend/src/app/components/ChartGraph/BasicTableChart/AntdTableWrapper.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
* limitations under the License.
1717
*/
1818

19-
import { Table } from 'antd';
19+
import { ConfigProvider, Table } from 'antd';
20+
import { antdLocales } from 'locales/i18n';
2021
import { FC, memo } from 'react';
22+
import { useTranslation } from 'react-i18next';
2123
import styled from 'styled-components/macro';
2224

2325
interface TableStyleConfigProps {
@@ -47,6 +49,8 @@ const AntdTableWrapper: FC<{
4749
summaryFn?: (data) => { total: number; summarys: [] };
4850
}> = memo(
4951
({ dataSource, columns, children, summaryFn, tableStyleConfig, ...rest }) => {
52+
const { i18n } = useTranslation();
53+
5054
const getTableSummaryRow = pageData => {
5155
if (!summaryFn) {
5256
return undefined;
@@ -68,13 +72,15 @@ const AntdTableWrapper: FC<{
6872
};
6973

7074
return (
71-
<StyledTable
72-
{...rest}
73-
tableStyleConfig={tableStyleConfig}
74-
dataSource={dataSource}
75-
columns={columns}
76-
summary={getTableSummaryRow}
77-
/>
75+
<ConfigProvider locale={antdLocales[i18n.language]}>
76+
<StyledTable
77+
{...rest}
78+
tableStyleConfig={tableStyleConfig}
79+
dataSource={dataSource}
80+
columns={columns}
81+
summary={getTableSummaryRow}
82+
/>
83+
</ConfigProvider>
7884
);
7985
},
8086
);

frontend/src/app/components/ChartGraph/NormalOutlineMapChart/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ const config: ChartConfig = {
9797
color: '#ced4da',
9898
},
9999
},
100+
{
101+
label: 'map.roam',
102+
key: 'roam',
103+
default: true,
104+
comType: 'checkbox',
105+
},
100106
],
101107
},
102108
{
@@ -310,6 +316,7 @@ const config: ChartConfig = {
310316
focusArea: '聚焦选中区域',
311317
areaColor: '区域颜色',
312318
areaEmphasisColor: '选中区域高亮颜色',
319+
roam: '鼠标平移',
313320
},
314321
levelType: {
315322
china: '中国-省级地图',
@@ -362,6 +369,7 @@ const config: ChartConfig = {
362369
focusArea: 'Focus Area',
363370
areaColor: 'Area Color',
364371
areaEmphasisColor: 'Area Emphasis Color',
372+
roam: 'Mouse translating',
365373
},
366374
levelType: {
367375
china: 'China',

frontend/src/app/components/ChartGraph/ScatterOutlineMapChart/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ const config: ChartConfig = {
102102
color: '#ced4da',
103103
},
104104
},
105+
{
106+
label: 'map.roam',
107+
key: 'roam',
108+
default: true,
109+
comType: 'checkbox',
110+
},
105111
{
106112
label: 'map.cycleRatio',
107113
key: 'cycleRatio',
@@ -319,6 +325,7 @@ const config: ChartConfig = {
319325
cycleRatio: '气泡大像素比',
320326
areaColor: '区域颜色',
321327
areaEmphasisColor: '选中区域高亮颜色',
328+
roam: '鼠标平移',
322329
},
323330
levelType: {
324331
china: '中国-省级地图',
@@ -369,6 +376,7 @@ const config: ChartConfig = {
369376
areaColor: 'Area Color',
370377
areaEmphasisColor: 'Area Emphasis Color',
371378
cycleRatio: 'Cycle Ratio',
379+
roam: 'Mouse translating',
372380
},
373381
levelType: {
374382
china: 'China',

frontend/src/app/components/ChartIFrameContainer/ChartIFrameEventBroker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class ChartIFrameEventBroker {
149149

150150
private registerListener(c: IChart): void {
151151
this.subscribe(ChartLifecycle.Mounted, c?.onMount);
152-
this.subscribe(ChartLifecycle.Updated, c?.onUpdated);
153152
this.subscribe(ChartLifecycle.Resize, c?.onResize);
153+
this.subscribe(ChartLifecycle.Updated, c?.onUpdated);
154154
this.subscribe(ChartLifecycle.UnMount, c?.onUnMount);
155155
}
156156

0 commit comments

Comments
 (0)