Jump to content

IronPython script triggered by Property Axis.X.Expression (external data)


Mark Herrmann

Recommended Posts

Hi there,

I need to change the color by axis if somone pulls the hierarchy level on the x-axis of my bar chart to the highest level as otherwise the computed values are incorrect (can't user OVER functions to correct the value computation since the data is kept external).

Now I know I could use a document property and tie an IronPython script to it that would change the color by axis if the value of that property changed. Initially I thought I was lucky since that hierarchy on the x-axis is listed as document property in the custom expressions dialogue.

 

 

However, when opening Document Properties from the File menue (where I can tie scripts to properties) that Axis.X.Expression is not listed.

 

 

Anyone's got an idea how to trigger an IronPython script upon change of that Axis.X.Expression property (i.e. the value of the hiearchy slider)

Thanks,

Mark

Link to comment
Share on other sites

I've tested a different approach, again w/o success but I might be closer if someone knows how to break the evaluation of a case statement...

The goal is to use the parent column of the hierarchy on the x-axis as the color by column (that is what I wanted to do using the IronPython script). However, I found a way with a couple of THEN expressions (see screenshots below) which works even with external data (otherwise it would be simple...). The only problem is that depending on the position of the hierarchy slider on the x-axis not all [X.columname] are available so the expression throws an error. If I could stop the evaluation of the expression once it evaluates to TRUE this should work...The expression works fine when the hierarchy slider is at the highest level:Available X.columns at Hierarchy Lvl 3 The expression fails if the hierarchy slider is at a lower position since the X.columnname are not available even though the expression should evaluate to TRUE before reaching those lines:

hierarchy_lvl0_0.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...