Skip to content

Commit 4fc94ea

Browse files
author
吴磊
committed
feat: 溢出需求增加I18N,更改函数名,合理放置函数文件目录
1 parent ecadba6 commit 4fc94ea

File tree

12 files changed

+314
-135
lines changed

12 files changed

+314
-135
lines changed

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,18 @@ const config: ChartConfig = {
324324
comType: 'select',
325325
default: 'break',
326326
options: {
327+
translateItemLabel: true,
327328
items: [
328-
{ label: '溢出', value: 'none' },
329-
{ label: '截断', value: 'truncate' },
330-
{ label: '换行', value: 'break' },
331-
{ label: '强制换行', value: 'breakAll' },
329+
{ label: '@[email protected]', value: 'none' },
330+
{
331+
label: '@[email protected]',
332+
value: 'truncate',
333+
},
334+
{ label: '@[email protected]', value: 'break' },
335+
{
336+
label: '@[email protected]',
337+
value: 'breakAll',
338+
},
332339
],
333340
},
334341
},
@@ -479,6 +486,12 @@ const config: ChartConfig = {
479486
nameGap: '标题与轴线距离',
480487
min: '最小值',
481488
max: '最大值',
489+
overflowType: {
490+
none: '溢出',
491+
truncate: '截断',
492+
break: '换行',
493+
breakAll: '强制换行',
494+
},
482495
},
483496
graph: {
484497
title: '图形设置',
@@ -550,6 +563,12 @@ const config: ChartConfig = {
550563
nameGap: 'Name Gap',
551564
min: 'Min',
552565
max: 'Max',
566+
overflowType: {
567+
none: 'None',
568+
truncate: 'Truncate',
569+
break: 'Break',
570+
breakAll: 'BreakAll',
571+
},
553572
},
554573
graph: {
555574
title: 'Graph Setting',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,18 @@ const config: ChartConfig = {
245245
comType: 'select',
246246
default: 'break',
247247
options: {
248+
translateItemLabel: true,
248249
items: [
249-
{ label: '溢出', value: 'none' },
250-
{ label: '截断', value: 'truncate' },
251-
{ label: '换行', value: 'break' },
252-
{ label: '强制换行', value: 'breakAll' },
250+
{ label: '@[email protected]', value: 'none' },
251+
{
252+
label: '@[email protected]',
253+
value: 'truncate',
254+
},
255+
{ label: '@[email protected]', value: 'break' },
256+
{
257+
label: '@[email protected]',
258+
value: 'breakAll',
259+
},
253260
],
254261
},
255262
},
@@ -491,6 +498,12 @@ const config: ChartConfig = {
491498
nameGap: '标题与轴线距离',
492499
min: '最小值',
493500
max: '最大值',
501+
overflowType: {
502+
none: '溢出',
503+
truncate: '截断',
504+
break: '换行',
505+
breakAll: '强制换行',
506+
},
494507
},
495508
label: {
496509
title: '标签',
@@ -555,6 +568,12 @@ const config: ChartConfig = {
555568
nameGap: 'Name Gap',
556569
min: 'Min',
557570
max: 'Max',
571+
overflowType: {
572+
none: 'None',
573+
truncate: 'Truncate',
574+
break: 'Break',
575+
breakAll: 'BreakAll',
576+
},
558577
},
559578
label: {
560579
title: 'Label',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,18 @@ const config: ChartConfig = {
259259
comType: 'select',
260260
default: 'break',
261261
options: {
262+
translateItemLabel: true,
262263
items: [
263-
{ label: '溢出', value: 'none' },
264-
{ label: '截断', value: 'truncate' },
265-
{ label: '换行', value: 'break' },
266-
{ label: '强制换行', value: 'breakAll' },
264+
{ label: '@[email protected]', value: 'none' },
265+
{
266+
label: '@[email protected]',
267+
value: 'truncate',
268+
},
269+
{ label: '@[email protected]', value: 'break' },
270+
{
271+
label: '@[email protected]',
272+
value: 'breakAll',
273+
},
267274
],
268275
},
269276
},
@@ -504,6 +511,12 @@ const config: ChartConfig = {
504511
nameGap: '标题与轴线距离',
505512
min: '最小值',
506513
max: '最大值',
514+
overflowType: {
515+
none: '溢出',
516+
truncate: '截断',
517+
break: '换行',
518+
breakAll: '强制换行',
519+
},
507520
},
508521
label: {
509522
title: '标签',
@@ -577,6 +590,12 @@ const config: ChartConfig = {
577590
nameGap: 'Name Gap',
578591
min: 'Min',
579592
max: 'Max',
593+
overflowType: {
594+
none: 'None',
595+
truncate: 'Truncate',
596+
break: 'Break',
597+
breakAll: 'BreakAll',
598+
},
580599
},
581600
label: {
582601
title: 'Label',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,18 @@ const config: ChartConfig = {
259259
comType: 'select',
260260
default: 'break',
261261
options: {
262+
translateItemLabel: true,
262263
items: [
263-
{ label: '溢出', value: 'none' },
264-
{ label: '截断', value: 'truncate' },
265-
{ label: '换行', value: 'break' },
266-
{ label: '强制换行', value: 'breakAll' },
264+
{ label: '@[email protected]', value: 'none' },
265+
{
266+
label: '@[email protected]',
267+
value: 'truncate',
268+
},
269+
{ label: '@[email protected]', value: 'break' },
270+
{
271+
label: '@[email protected]',
272+
value: 'breakAll',
273+
},
267274
],
268275
},
269276
},
@@ -504,6 +511,12 @@ const config: ChartConfig = {
504511
nameGap: '标题与轴线距离',
505512
min: '最小值',
506513
max: '最大值',
514+
overflowType: {
515+
none: '溢出',
516+
truncate: '截断',
517+
break: '换行',
518+
breakAll: '强制换行',
519+
},
507520
},
508521
label: {
509522
title: '标签',
@@ -577,6 +590,12 @@ const config: ChartConfig = {
577590
nameGap: 'Name Gap',
578591
min: 'Min',
579592
max: 'Max',
593+
overflowType: {
594+
none: 'None',
595+
truncate: 'Truncate',
596+
break: 'Break',
597+
breakAll: 'BreakAll',
598+
},
580599
},
581600
label: {
582601
title: 'Label',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,18 @@ const config: ChartConfig = {
253253
comType: 'select',
254254
default: 'break',
255255
options: {
256+
translateItemLabel: true,
256257
items: [
257-
{ label: '溢出', value: 'none' },
258-
{ label: '截断', value: 'truncate' },
259-
{ label: '换行', value: 'break' },
260-
{ label: '强制换行', value: 'breakAll' },
258+
{ label: '@[email protected]', value: 'none' },
259+
{
260+
label: '@[email protected]',
261+
value: 'truncate',
262+
},
263+
{ label: '@[email protected]', value: 'break' },
264+
{
265+
label: '@[email protected]',
266+
value: 'breakAll',
267+
},
261268
],
262269
},
263270
},
@@ -498,6 +505,12 @@ const config: ChartConfig = {
498505
nameGap: '标题与轴线距离',
499506
min: '最小值',
500507
max: '最大值',
508+
overflowType: {
509+
none: '溢出',
510+
truncate: '截断',
511+
break: '换行',
512+
breakAll: '强制换行',
513+
},
501514
},
502515
label: {
503516
title: '标签',
@@ -571,6 +584,12 @@ const config: ChartConfig = {
571584
nameGap: 'Name Gap',
572585
min: 'Min',
573586
max: 'Max',
587+
overflowType: {
588+
none: 'None',
589+
truncate: 'Truncate',
590+
break: 'Break',
591+
breakAll: 'BreakAll',
592+
},
574593
},
575594
label: {
576595
title: 'Label',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,18 @@ const config: ChartConfig = {
253253
comType: 'select',
254254
default: 'break',
255255
options: {
256+
translateItemLabel: true,
256257
items: [
257-
{ label: '溢出', value: 'none' },
258-
{ label: '截断', value: 'truncate' },
259-
{ label: '换行', value: 'break' },
260-
{ label: '强制换行', value: 'breakAll' },
258+
{ label: '@[email protected]', value: 'none' },
259+
{
260+
label: '@[email protected]',
261+
value: 'truncate',
262+
},
263+
{ label: '@[email protected]', value: 'break' },
264+
{
265+
label: '@[email protected]',
266+
value: 'breakAll',
267+
},
261268
],
262269
},
263270
},
@@ -498,6 +505,12 @@ const config: ChartConfig = {
498505
nameGap: '标题与轴线距离',
499506
min: '最小值',
500507
max: '最大值',
508+
overflowType: {
509+
none: '溢出',
510+
truncate: '截断',
511+
break: '换行',
512+
breakAll: '强制换行',
513+
},
501514
},
502515
label: {
503516
title: '标签',
@@ -571,6 +584,12 @@ const config: ChartConfig = {
571584
nameGap: 'Name Gap',
572585
min: 'Min',
573586
max: 'Max',
587+
overflowType: {
588+
none: 'None',
589+
truncate: 'Truncate',
590+
break: 'Break',
591+
breakAll: 'BreakAll',
592+
},
574593
},
575594
label: {
576595
title: 'Label',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,18 @@ const config: ChartConfig = {
253253
comType: 'select',
254254
default: 'break',
255255
options: {
256+
translateItemLabel: true,
256257
items: [
257-
{ label: '溢出', value: 'none' },
258-
{ label: '截断', value: 'truncate' },
259-
{ label: '换行', value: 'break' },
260-
{ label: '强制换行', value: 'breakAll' },
258+
{ label: '@[email protected]', value: 'none' },
259+
{
260+
label: '@[email protected]',
261+
value: 'truncate',
262+
},
263+
{ label: '@[email protected]', value: 'break' },
264+
{
265+
label: '@[email protected]',
266+
value: 'breakAll',
267+
},
261268
],
262269
},
263270
},
@@ -498,6 +505,12 @@ const config: ChartConfig = {
498505
nameGap: '标题与轴线距离',
499506
min: '最小值',
500507
max: '最大值',
508+
overflowType: {
509+
none: '溢出',
510+
truncate: '截断',
511+
break: '换行',
512+
breakAll: '强制换行',
513+
},
501514
},
502515
label: {
503516
title: '标签',
@@ -571,6 +584,12 @@ const config: ChartConfig = {
571584
nameGap: 'Name Gap',
572585
min: 'Min',
573586
max: 'Max',
587+
overflowType: {
588+
none: 'None',
589+
truncate: 'Truncate',
590+
break: 'Break',
591+
breakAll: 'BreakAll',
592+
},
574593
},
575594
label: {
576595
title: 'Label',

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

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,18 @@ const config: ChartConfig = {
253253
comType: 'select',
254254
default: 'break',
255255
options: {
256+
translateItemLabel: true,
256257
items: [
257-
{ label: '溢出', value: 'none' },
258-
{ label: '截断', value: 'truncate' },
259-
{ label: '换行', value: 'break' },
260-
{ label: '强制换行', value: 'breakAll' },
258+
{ label: '@[email protected]', value: 'none' },
259+
{
260+
label: '@[email protected]',
261+
value: 'truncate',
262+
},
263+
{ label: '@[email protected]', value: 'break' },
264+
{
265+
label: '@[email protected]',
266+
value: 'breakAll',
267+
},
261268
],
262269
},
263270
},
@@ -498,6 +505,12 @@ const config: ChartConfig = {
498505
nameGap: '标题与轴线距离',
499506
min: '最小值',
500507
max: '最大值',
508+
overflowType: {
509+
none: '溢出',
510+
truncate: '截断',
511+
break: '换行',
512+
breakAll: '强制换行',
513+
},
501514
},
502515
label: {
503516
title: '标签',
@@ -571,6 +584,12 @@ const config: ChartConfig = {
571584
nameGap: 'Name Gap',
572585
min: 'Min',
573586
max: 'Max',
587+
overflowType: {
588+
none: 'None',
589+
truncate: 'Truncate',
590+
break: 'Break',
591+
breakAll: 'BreakAll',
592+
},
574593
},
575594
label: {
576595
title: 'Label',

0 commit comments

Comments
 (0)