You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2019/01/26 13:58:30 UTC

[GitHub] lleohao commented on a change in pull request #3264: [ZEPPELIN-3908] Fix Date Sorting issue

lleohao commented on a change in pull request #3264: [ZEPPELIN-3908] Fix Date Sorting issue
URL: https://github.com/apache/zeppelin/pull/3264#discussion_r251199957
 
 

 ##########
 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:
   `typeof Number(any)` constant equal 'number' 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services