Jump to content

How to fix dynamic property control for combination bar chart


gurusai sankar

Recommended Posts

Hi All,

I have the data like Capacity, Allocation , Availability, Unmet demand (in Hours & FTE)

My requirement is : We should provide a radio button or single value drop down for Hours and FTE

If user will select Hours-Capacity, Allocation , Availability, Unmet demand hours data should show in combination bar chart.

If user will select FTE-Capacity, Allocation , Availability, Unmet demand FTEdata should show.

PFA

Request you to work on attached dxp file share your valueble feedback.

 

Regards,

Guru

Link to comment
Share on other sites

Option 1:

You can make use of iron python script which will be triggered on dropdown value selection. In the script, you can changethe expression of your combination bar chart like

expression='Sum([capacity hours])........' if hours is selected or expression='Sum([capacity fte])........' when fte is selected. Below is the reference where you can find all python scripts:

https://community.spotfire.com/wiki/ironpython-scripting-tibco-spotfire

https://www.sf-ref.com/ironpython/visualizations/combination-chart/y-axis/

Option 2:

Create four document properties one for each column. Set your combination chart expresssion asSum([${col1}]),Sum([${col2}]),Sum([${col3}]),Sum([${col4}])

Now on dropdown change trigger iron python script where you can set the values for these 4 document properties to the respective column name like:

if Document.Properties["drop"]=="FTE":

Document.Properties["col1"]="abc-FTE"

Document.Properties["col2"]="cdf-FTE"

Document.Properties["col3"]="xyz-FTE"

Document.Properties["col4"]="def-FTE"

else:

Document.Properties["col1"]="abc-Hours"

Document.Properties["col2"]="cdf-Hours"

Document.Properties["col3"]="xyz-Hours"

Document.Properties["col4"]="def-Hours"

Link to comment
Share on other sites

  • 5 months later...
  • 3 months later...

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...