lleohao commented on a change in pull request #3264: [ZEPPELIN-3908] Fix Date
Sorting issue
URL: https://github.com/apache/zeppelin/pull/3264#discussion_r251200013
##########
File path:
zeppelin-web/src/app/visualization/builtins/visualization-nvd3chart.js
##########
@@ -164,6 +164,18 @@ export default class Nvd3ChartVisualization extends
Visualization {
let rowIndexValue = {};
for (let k in rows) {
+ let rowKeys = Object.keys(rows);
+ let isNumberKey = false;
+
+ rowKeys.sort(function(a, b) {
+ if (!isNaN(a) && !isNaN(b) && typeof Number(a) === 'number' && typeof
Number(b) === 'number') {
Review comment:
The rowKeys is string array and its value is not empty. You can judge this
way
```javascript
if (!isNaN(a) && !isNaN(b)) {...}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services