Python API - get min/max value of legend (scalar) in the Python prompt
Hi there,
How to get legendscalar minValue element in the Python prompt, when model is already open in the HV window ?
I tried (based on doc https://help.altair.com/hwdesktop/pythonapi/hyperview/hw_hv.html#hw.hv.legendscalar.LegendScalar.minValue):
>>> legendscalar.minValue
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_14312\2554309752.py in <module>
----> 1 legendscalar.minValue
AttributeError: module 'hw.hv.legendscalar' has no attribute 'minValue'
INFO:ipykernel.inprocess.ipkernel:Exception in execute request:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_14312\2554309752.py in <module>
----> 1 legendscalar.minValue
AttributeError: module 'hw.hv.legendscalar' has no attribute 'minValue'
But I have miss something I guess to mix Python API and HV interface.
Thanks
Answers
-
Hello,
did you look at the video below:
You can query the StaticMinMax or DynamicMinMax measure to extract this information
Best Regards,
Michael
1 -
Thanks Michael !
I'll try it once my version upgraded to v2024.1.
Best regards,
Pierre
1