I want to add some kind of conditioning to this scale:
when legend == 0, then color should be white, else use color from range.
Is it even possible to change it here?
You could put your color palette in a signal (like "signals": [{"name": "colorPalette", "value": ["red", "blue", "purple"]}] ). then you could go into your scale and write it as: "range": {"signal": "data('teams_legend').legend == 0 ? 'white' : colorPalette"}. I'm not entirely sure that that will work right, but please give it a whirl and let me know if it works.
Hi Midas
I tried this solution in previous work - it works fine but don't exactly fulfill my needs.
I managed to solve this problem by usage of production rules in legend. Its little bit more complex (combinated with signals), but maybe it can help other seekers :
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.