-
Notifications
You must be signed in to change notification settings - Fork 61
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
XY Chart: Add area and scatter chart styles #399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial hot take:
Initial action items:
I only looked at the functionality, not the code, so this can be considered a "sanity check" |
I recently learned that each data series in an xy chart specifies the chart type/style (line, scatter) that should be used to visualize it. I think this PR should be adjusted to automatically display data based on the chart type specified in the series label rather than offering a drop down like I initially suggested to @thefinaljob. Allowing all chart types implies that any option makes sense which isn't the case (ex. you wouldn't use a scatter plot to visualize continuous time-based data). @MatthewKhouzam @tahini thoughts? |
Yes! That was indeed discussed offline with Nikolai. Note that the data type from the server comes with the series (for instance, I think the CPU usage has the total as a line and individual threads as area), not the whole chart, while iiuc, with chartjs, the series type will have to be for the whole chart. Would you default to the first one you get? |
this.buildXYData(xyDataResponse.model.series); | ||
switch (this.desiredChartStyle) { | ||
case 'scatter': | ||
this.buildScatterData(xyDataResponse.model.series); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, if different types of chart require the data to be formatted differently, they should be encapsulated together in a single class so that there can be no mismatch. You could add separate widget classes for each series type (in react, it is suggested to multiply small stateless classes instead of big ones with ton of stuff in it). So you could have ScatterXy, LineXy, AreaXy, which would take the series as props and would format the data appropriately and render the proper line type.
Here, you could definitely have a race condition between changing the chart type and zooming in with the old chart type and get the view to temporarily render wrong, until it is rendered right ;-)
But I'll let the maintainers of the extension decide if my comment is purely informative or if you should act on it
5422129
to
820176f
Compare
Reopeing after a snafu |
This is a mess, this is what happens when you try to fix solder.... several times. |
OK looks like the submission is ready. To address @MatthewKhouzam's comments.
Thank you for your feedback Matthew!! This was my first serious PR and it was great to get a lot of good pointers in the right direction. Known bugs
|
34fb923
to
c0d2efa
Compare
…pse-cdt-cloud#45 Signed-off-by: Nikolai Peram <nikolai_peram@outlook.com>
c0d2efa
to
c8f79d8
Compare
Hey, before getting into the review proper, please remember to update the commit message to follow the guidelines. The reasoning being if and when something goes wrong, it's jarring to have a Hodge-podge of commit messages to go through, standardized ones will make things clearer in our time of duress. :) |
Stacked area charts freeze on my computer. Could you profile it with the apt trace CPU usage and clicking on all? |
@thefinaljob the commit guidelines were recently added to the main readme in the How to contribute code section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the commit message and fix the performance issue.
Exceptionally, I'm going to make edits to the title and description of this PR to correct some style issues. |
@thefinaljob @ebugden any news on this one. It would interesting to continue with it on it. It could help solving the issues with some of the line charts (e.g. 'Latency vs Time' that are scatter charts)? By the way, this PR needs to rebased to the latest master branch where multiple updates to the XYOutputComponent have been done (i.e. zoom/navigation improvement, BigInt for timestamps). I pushed a rebased version to my GitHub fork (https://github.com/bhufmann/theia-trace-extension/tree/xy-chart-styles-rebased) where you can see the changes needed. Please note that I didn't address any review comments provided here. Please note, that showing the 'Latency vs Time' views as Scatter chart work well and would improve the UX. Showing 'Latency vs Time' view as line charts with the current implementation doesn't not show the data correctly. They should be shown as Scatter chart where the points are connected with lines. This is an option to the scatter chart. This fix is not part of the scope of this PR. |
@arfio could take a look at this if they have free time. |
When selecting a "latency vs. time" view, the data is plotted in a scatter chart. Each point of the data set can be displayed individually (scatter) or connected by a line. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. Each point of the data set can be displayed individually (scatter) or connected by a line. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. Each point of the data set can be displayed individually (scatter) or connected by a line. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. Each point of the data set can be displayed individually (scatter) or connected by a line. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. The scatter chart is to remain not avialble to the user until the tooltip is implemented. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. The scatter chart is to remain not available to the user until the tooltip is implemented. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. The scatter chart is to remain not available to the user until the tooltip is implemented. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. The scatter chart is to remain not available to the user until the tooltip is implemented. This pull request replaces eclipse-cdt-cloud#399. Contributes towards fixing eclipse-cdt-cloud#45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Data sets with scattered points, like the "latency vs. time" view, are now plotted in a scatter chart. The type of data set is defined by the string "scatter" in the output id. The scatter chart is to remain not available to the user until the tooltip is implemented. This pull request replaces #399. Contributes towards fixing #45. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
Closing this one after #595 was merged. Thanks for the effort it helped with the current implementation. |
Added area and scatter chart styles through a dropdown menu
Contributes towards fixing #45