Python API - get min/max value of legend (scalar) in the Python prompt

Pierre_20718
Pierre_20718 Altair Community Member
edited October 25 in Community Q&A

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