-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: dx.indicator
spec
#1062
feat: dx.indicator
spec
#1062
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.
Makes sense to me... only thing I'd like is to be able to pass in a value that I have outside of a table as well. Calculated from a user input or something.
It could be that we pump it through a table anyway, but I'd like to see an example of how to hook that up.
Added an example of putting some values in a table. |
- **Highlight specific metrics**: Indicator plots are useful when you want to highlight specific numeric metrics in a visually appealing way. | ||
- **Compare metrics to a reference value**: Indicator plots are useful to compare metrics to a reference value, such as a starting value or a target value. | ||
- **Compare metrics to each other**: Indicator plots are useful to compare multiple metrics to each other by highlighting where they fall relative to each other. | ||
- |
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.
stray dash
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.
removed
469a173
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.
Looks good to me.
This has inspired me to create a utility function called dict_table
for where you just want a table from a dictionary, e.g.
from deephaven import dict_table
my_table = dict_table({
"MyValue": [my_value],
"MyReference": [my_reference],
})
Or even just assume if it's not a list passed in, that it is just a one row table and you don't need to pass in an array explicitly, e.g.:
from deephaven import dict_table
my_table = dict_table({
"MyValue": my_value,
"MyReference": my_reference,
})
Don't have as control over types ... but it would be nice for creating quick tables like in this case.
spec for #1019
I haven't really written a spec for
dx
before but it made sense to me to just put it in a new function withNotImplementedError
.Instead of just enabling one indicator, you can create multiple at one time with a plot by that makes subplots of indicators. This enables, for example, the creation of a new indicator automatically as a new symbol ticks in.
The default behavior is only a
number
if you only providevalue
andnumber+delta
if you providereference
as well.https://plotly.com/python/indicator/
Syntax is otherwise generally in line with other
dx
functions and most other behavior is fairly straightforward.