Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

"Sort axis by" on a combination chart

Assuming you have a combination chart with 'colA' and 'colB; columns, you can sort by 'colA', 'colB' or 'none'

from Spotfire.Dxp.Application.Visuals import CategoryKey
from Spotfire.Dxp.Application.Visuals import CombinationChart

#Define sorting typesmyCategoryKey0=CategoryKey() #Same as 'None'
myCategoryKey1=CategoryKey("Sum(ColA)")
myCategoryKey2=CategoryKey("Sum(ColB)")

#Perform sorting

vis.As[CombinationChart]().SortBy=myCategoryKey1

1 comment:

Unknown said...

Hi
For myCategoryKey1=CategoryKey("Sum(ColA)")
It does not work if I replace "Sum(ColA)" to "Sum(ColA)/Sum(ColB).
Thanks