You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/02 15:00:35 UTC
[GitHub] [echarts] susiwen8 commented on a change in pull request #16614: fix(sanky):fallback to black if color were illegal
susiwen8 commented on a change in pull request #16614:
URL: https://github.com/apache/echarts/pull/16614#discussion_r817776535
##########
File path: src/visual/VisualMapping.ts
##########
@@ -693,7 +694,11 @@ function setVisualToOption(thisOption: VisualMappingInnerOption, visualArr: Visu
thisOption.visual = visualArr;
if (thisOption.type === 'color') {
thisOption.parsedVisual = zrUtil.map(visualArr, function (item: string) {
- return zrColor.parse(item);
+ const color = zrColor.parse(item);
+ if (!color && __DEV__) {
+ warn(`'${item}' is an illegal color, fallback to '#000000'`, true);
+ }
+ return zrColor.parse(item) || [0, 0, 0, 1];
Review comment:
Right.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org