feat: dx.indicator spec#1062
Conversation
mofojed
left a comment
There was a problem hiding this comment.
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. | ||
| - |
469a173
mofojed
left a comment
There was a problem hiding this comment.
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
dxbefore 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
numberif you only providevalueandnumber+deltaif you providereferenceas well.https://plotly.com/python/indicator/
Syntax is otherwise generally in line with other
dxfunctions and most other behavior is fairly straightforward.