-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Feature: Allow tooltip sorting by X, Y, and Pixel distance from cursor #6116
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
Changes from 5 commits
435d8d4
eb5123d
edf2125
7140374
e3ce6e7
6d27028
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,6 @@ tf_ts_library( | |
], | ||
deps = [ | ||
":internal_types", | ||
"//tensorboard/webapp/metrics/store:types", | ||
], | ||
) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,16 @@ See the License for the specific language governing permissions and | |
limitations under the License. | ||
==============================================================================*/ | ||
export * from './internal_types'; | ||
|
||
// When adding a new value to the enum, please implement the deserializer on | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest, I didn't realize that types is just reexporting internal_types. That's odd. Maybe (as a followup PR, please not in this one) we should just get rid of internal_types and move everything into this file. The indirection is unnecessary and we shouldn't fool ourselves into thinking anything in internal_types is actually internal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 that totally makes sense as a followup |
||
// data_source/metrics_data_source.ts. | ||
// When editing a value of the enum, please write a backward compatible | ||
// deserializer in tensorboard/webapp/metrics/store/metrics_reducers.ts | ||
export enum TooltipSort { | ||
DEFAULT = 'default', | ||
ALPHABETICAL = 'alphabetical', | ||
ASCENDING = 'ascending', | ||
DESCENDING = 'descending', | ||
NEAREST = 'nearest', | ||
NEAREST_Y = 'nearest_Y', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,8 @@ | |
<ng-template | ||
#tooltip | ||
let-tooltipData="data" | ||
let-cursorLoc="cursorLocationInDataCoord" | ||
let-cursorLocationInDataCoord="cursorLocationInDataCoord" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whatever names you choose line_chart_interactive_view.ts, please mirror here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These names all look the same to me? Am I missing something? (of note, they were not the same before and I renamed them to be the same). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was another comment I left about naming inconsistency, which does not seem to have been addressed. Do you mind taking a look at that one and then revisiting this one? I assume this comment doesn't make sense to you because you missed the other comment. |
||
let-cursorLocation="cursorLocation" | ||
> | ||
<table class="tooltip"> | ||
<thead> | ||
|
@@ -136,7 +137,8 @@ | |
<tbody> | ||
<ng-container | ||
*ngFor=" | ||
let datum of getCursorAwareTooltipData(tooltipData, cursorLoc); | ||
let datum of getCursorAwareTooltipData(tooltipData, | ||
cursorLocationInDataCoord, cursorLocation); | ||
trackBy: trackByTooltipDatum | ||
" | ||
> | ||
|
Uh oh!
There was an error while loading. Please reload this page.