Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZEPPELIN-1103] Fix "stackedAreaChart", "lineWithFocusChart" graph when dataset contains "NULL" value. #1093

Closed
wants to merge 3 commits into from

Conversation

voyageth
Copy link
Contributor

@voyageth voyageth commented Jun 27, 2016

What is this PR for?

Fix "stackedAreaChart", "lineWithFocusChart" graph when dataset contains "NULL" value.

  • wired graph with "NULL" value
    asis1
    asis2
  • fixed graph with "NULL" value
    tobe1
    tobe2

What type of PR is it?

Bug Fix

Todos

  • - Check side effect.
  • - Need fix when maxRowValue == rowIdx

What is the Jira issue?

How should this be tested?

  • This problem can regenerate under dataset like this.
    image
  • rowIndexValue variable is like this on 1777 line.
    rowIndexValue : Object {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", 13: "13", 14: "14", 15: "15", 16: "16", 17: "17", 18: "18", 19: "19", 20: "20", 21: "21", 22: "22", 23: "23", 24: "24", 25: "25", 26: "26", 27: "27", 28: "28", 29: "29", 30: "30", 31: "31", 32: "32", 33: "33", 34: "34", 35: "35", 36: "36", 37: "37", 38: "38", 39: "39", 40: "40", 41: "41", 42: "42", 43: "43", 44: "52"}
    rowNameIndex : Object {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 52: 44}

### What is this PR for?
Fix "stackedAreaChart", "lineWithFocusChart" graph when dataset contains "NULL" value.

### What type of PR is it?
Bug Fix

### Todos
* [ ] - Check side effect.
* [ ] - Need fix when maxRowValue == rowIdx

### How should this be tested?
Test when row data set is like this on 1777 line.
rowIndexValue : Object {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", 10: "10", 11: "11", 12: "12", 13: "13", 14: "14", 15: "15", 16: "16", 17: "17", 18: "18", 19: "19", 20: "20", 21: "21", 22: "22", 23: "23", 24: "24", 25: "25", 26: "26", 27: "27", 28: "28", 29: "29", 30: "30", 31: "31", 32: "32", 33: "33", 34: "34", 35: "35", 36: "36", 37: "37", 38: "38", 39: "39", 40: "40", 41: "41", 42: "42", 43: "43", 44: "52"}
rowNameIndex : Object {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 52: 44}
use wrong function
add semicolon
@corneadoug
Copy link
Contributor

@voyageth Thank you for the contribution,
Could you create a jira issue here: https://issues.apache.org/jira/browse/ZEPPELIN
And also provide better details on the bug, it could be:

  • A screenshot of GIF of the bug
  • Explanations of what is happening and what is expected
    As well as some code to input in a paragraph and instructions to reproduce the error

@Leemoonsoo
Copy link
Member

Thanks @voyageth for the contribution.

I tried reproduce the problem by doing

%sh echo -e "%table key\tvalue\n\t1000\n1\t100\n2\t200"

And i've got weird graph.
image

However, the weird graph still remains after applying this proposed fix.
@voyageth, Could you guide me how to reproduce the problem and test this contribution?

@voyageth
Copy link
Contributor Author

voyageth commented Jul 6, 2016

@Leemoonsoo Oh, empty string also make weird graph too!
This PR doesn't consider that condition.

This PR can fix following condition.
%sh echo -e "%table key\tvalue\nnull\t1000\n1\t100\n2\t200\n99\t900"

  • before apply PR
    asis3
  • after apply PR
    tobe3

@voyageth voyageth changed the title [Bug Fix] Fix "stackedAreaChart", "lineWithFocusChart" graph when dataset contains "NULL" value. [ZEPPELIN-1103] Fix "stackedAreaChart", "lineWithFocusChart" graph when dataset contains "NULL" value. Jul 13, 2016
@voyageth voyageth closed this May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants