Add timeline (by topic) in Visualizer, Add stack (by topic) in Chart, editing topic color issues#4
Add timeline (by topic) in Visualizer, Add stack (by topic) in Chart, editing topic color issues#4tprasertsup wants to merge 4 commits into
Conversation
| @@ -285,23 +285,19 @@ | |||
| const topicCell = $(this).find('td:eq(2)'); | |||
There was a problem hiding this comment.
Let's not fetch data from html elements. We should store data in variables instead and then fetch data from them.
There was a problem hiding this comment.
There was a problem hiding this comment.
So I should color the topic cell when adding a new row?
| topicCell.css('background-color', `black` ); | ||
| return; | ||
| if (text != null && hue == null) { | ||
| addNewTopic(text); |
There was a problem hiding this comment.
This seems to be at a wrong place. This function seems to be about html display, so it shouldn't modify data.
There was a problem hiding this comment.
Also, using hue == null as a criterion seems brittle to me.
There was a problem hiding this comment.
Should I move this to when data is loaded to the web? // I wrote this to solve the case when new data is loaded and no color is associated with stored topics
| } | ||
| mapTopicColor[topic] = lastestHue; | ||
| lastestHue += 137; | ||
| if (lastestHue > 360) { |
There was a problem hiding this comment.
What if it's exactly 360? Do you want it to reset to 0 or stay as 360?
Using modulo operation is another solution.
Also fix problems when loading files and all topics are in the same color