From e72b603383f608201d9276f33768f3d532137153 Mon Sep 17 00:00:00 2001 From: susiwen Date: Tue, 23 Apr 2019 16:13:39 +0800 Subject: [PATCH 1/7] Fix negetive number or string exist in dimensions array, the corresponding line won't show (#10343) --- src/data/helper/completeDimensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/helper/completeDimensions.js b/src/data/helper/completeDimensions.js index 890531d7e1..4c5af8f453 100644 --- a/src/data/helper/completeDimensions.js +++ b/src/data/helper/completeDimensions.js @@ -117,7 +117,7 @@ function completeDimensions(sysDims, source, opt) { // Note: It is allowed that `dataDims.length` is `0`, e.g., options is // `{encode: {x: -1, y: 1}}`. Should not filter anything in // this case. - if (dataDims.length === 1 && dataDims[0] < 0) { + if (dataDims.length === 1 && dataDims[0] == null) { encodeDef.set(coordDim, false); return; } From 206885890b6c149772841b060715beb3c9297dc5 Mon Sep 17 00:00:00 2001 From: susiwen Date: Sun, 5 May 2019 13:06:46 +0800 Subject: [PATCH 2/7] Check if dataDims[0] type is number or not --- src/data/helper/completeDimensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/helper/completeDimensions.js b/src/data/helper/completeDimensions.js index 4c5af8f453..7bacd99c1b 100644 --- a/src/data/helper/completeDimensions.js +++ b/src/data/helper/completeDimensions.js @@ -117,7 +117,7 @@ function completeDimensions(sysDims, source, opt) { // Note: It is allowed that `dataDims.length` is `0`, e.g., options is // `{encode: {x: -1, y: 1}}`. Should not filter anything in // this case. - if (dataDims.length === 1 && dataDims[0] == null) { + if (dataDims.length === 1 && typeof dataDims[0] === 'number' && dataDims[0] < 0) { encodeDef.set(coordDim, false); return; } From bc0722969363c76fb952976a3b60047706094ff8 Mon Sep 17 00:00:00 2001 From: sushuang Date: Sun, 5 May 2019 14:00:10 +0800 Subject: [PATCH 3/7] Tweak the "is string" check. Tweak the "is string" check. Should better be the same as the existing checking. --- src/data/helper/completeDimensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/helper/completeDimensions.js b/src/data/helper/completeDimensions.js index 7bacd99c1b..0034094f81 100644 --- a/src/data/helper/completeDimensions.js +++ b/src/data/helper/completeDimensions.js @@ -117,7 +117,7 @@ function completeDimensions(sysDims, source, opt) { // Note: It is allowed that `dataDims.length` is `0`, e.g., options is // `{encode: {x: -1, y: 1}}`. Should not filter anything in // this case. - if (dataDims.length === 1 && typeof dataDims[0] === 'number' && dataDims[0] < 0) { + if (dataDims.length === 1 && !isString(dataDims[0]) && dataDims[0] < 0) { encodeDef.set(coordDim, false); return; } From 9a8bd71a39833ba990db6ffcb63e9f97b8cb2f59 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 15 Apr 2019 16:09:57 -0500 Subject: [PATCH 4/7] Add aria defaults for lang-en --- src/langEN.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/langEN.js b/src/langEN.js index 66846a09b7..e8308bfcbe 100644 --- a/src/langEN.js +++ b/src/langEN.js @@ -55,5 +55,37 @@ export default { title: 'Save as Image', lang: ['Right Click to Save Image'] } + }, + aria: { + general: { + withTitle: 'This is a chart about "{title}"', + withoutTitle: 'This is a chart,' + }, + series: { + single: { + prefix: '', + withName: 'This is a chart with type {seriesType} named {seriesName}.', + withoutName: 'This is a chart with type {seriesType}.' + }, + multiple: { + prefix: 'This chart consists of {seriesCount} series count.', + withName: 'The {seriesId} series is a {seriesType} representing {seriesName},', + withoutName: 'The {seriesId} series is a {seriesType},', + separator: { + middle: ';', + end: '。' + } + } + }, + data: { + allData: 'The data is -', + partialData: 'The first {displayCnt} item is ——', + withName: 'The data for {name} is {value}', + withoutName: '{value}', + separator: { + middle: ',', + end: '' + } + } } }; From 6bea8de60718d56436abbd2128ce252bb5c291a0 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 15 Apr 2019 16:30:22 -0500 Subject: [PATCH 5/7] Fix grammar --- src/langEN.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/langEN.js b/src/langEN.js index e8308bfcbe..160268c42e 100644 --- a/src/langEN.js +++ b/src/langEN.js @@ -79,7 +79,7 @@ export default { }, data: { allData: 'The data is -', - partialData: 'The first {displayCnt} item is ——', + partialData: 'The first {displayCnt} items are ——', withName: 'The data for {name} is {value}', withoutName: '{value}', separator: { From 3757de2540f87d68cc7198b0ffd906d5885531a7 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Fri, 19 Apr 2019 15:51:58 -0500 Subject: [PATCH 6/7] Improve based on revision --- src/langEN.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/langEN.js b/src/langEN.js index 160268c42e..5d79cb0b80 100644 --- a/src/langEN.js +++ b/src/langEN.js @@ -59,21 +59,21 @@ export default { aria: { general: { withTitle: 'This is a chart about "{title}"', - withoutTitle: 'This is a chart,' + withoutTitle: 'This is a chart,' }, series: { single: { prefix: '', - withName: 'This is a chart with type {seriesType} named {seriesName}.', + withName: ', and this is a chart with type {seriesType} named {seriesName}.', withoutName: 'This is a chart with type {seriesType}.' }, multiple: { prefix: 'This chart consists of {seriesCount} series count.', - withName: 'The {seriesId} series is a {seriesType} representing {seriesName},', + withName: ', and the {seriesId} series is a {seriesType} representing {seriesName},', withoutName: 'The {seriesId} series is a {seriesType},', separator: { - middle: ';', - end: '。' + middle: ';', + end: '.' } } }, @@ -83,7 +83,7 @@ export default { withName: 'The data for {name} is {value}', withoutName: '{value}', separator: { - middle: ',', + middle: ',', end: '' } } From bc53d742967d51ec4a72413c7bf1d7159ec33ced Mon Sep 17 00:00:00 2001 From: Ovilia Date: Mon, 6 May 2019 11:33:58 +0800 Subject: [PATCH 7/7] Update langEN.js --- src/langEN.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/langEN.js b/src/langEN.js index 5d79cb0b80..f55cf7a298 100644 --- a/src/langEN.js +++ b/src/langEN.js @@ -59,32 +59,32 @@ export default { aria: { general: { withTitle: 'This is a chart about "{title}"', - withoutTitle: 'This is a chart,' + withoutTitle: 'This is a chart' }, series: { single: { prefix: '', - withName: ', and this is a chart with type {seriesType} named {seriesName}.', - withoutName: 'This is a chart with type {seriesType}.' + withName: ' with type {seriesType} named {seriesName}.', + withoutName: ' with type {seriesType}.' }, multiple: { - prefix: 'This chart consists of {seriesCount} series count.', - withName: ', and the {seriesId} series is a {seriesType} representing {seriesName},', - withoutName: 'The {seriesId} series is a {seriesType},', + prefix: '. It consists of {seriesCount} series count.', + withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.', + withoutName: ' The {seriesId} series is a {seriesType}.', separator: { - middle: ';', - end: '.' + middle: '', + end: '' } } }, data: { - allData: 'The data is -', - partialData: 'The first {displayCnt} items are ——', - withName: 'The data for {name} is {value}', + allData: 'The data is as follows: ', + partialData: 'The first {displayCnt} items are: ', + withName: 'the data for {name} is {value}', withoutName: '{value}', separator: { middle: ',', - end: '' + end: '.' } } }