100pah commented on a change in pull request #13593:
URL: https://github.com/apache/echarts/pull/13593#discussion_r584611113
##########
File path: src/data/List.ts
##########
@@ -2160,6 +2161,10 @@ class List<
}
};
+ validateDimension = function (list: List, dim: DimensionName): boolean
{
Review comment:
I think use a static function does not match the convention of this file.
And as the param should better in type `DimensionLoose` rather than only
`DimensionName`.
I think it probably better to make a function like:
```ts
class List {
hasDimension(dim: DimensionLoose): boolean {
return !!this.getDimensionInfo(dim);
}
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]