In some cases (for ex. Trellis view), to get more visualization space, we could simply hide the legend.
For this, on change of View Type (using a drop down property control – ViewType), I am invoking a script to show or hide the legend.
Below, creating the property control ViewType:
IronPython Code: from Spotfire.Dxp.Application import Visuals from Spotfire.Dxp.Application.Visuals import LineChart from Spotfire.Dxp.Application.Visuals import Legend for vis in Application.Document.ActivePageReference.Visuals: if vis.Title == "Sales - Trellis View": vis.As[LineChart]().Legend.Visible = False if vis.Title == "Sales - Full View": vis.As[LineChart]().Legend.Visible = True
When using multiple date columns (switched using property control) on a particular axis, we lose the ability to change the time dimension of the date selected. In order to overcome this issue, we can add a Time Hierarchy property control (a slider) and use it to alter the date column’s time hierarchy.
We start off by building a property control for changing date column. An important note here is to provide the Value as exact literals of the column name which you want to use against a Display Name.
Then we create a TimeHierarchy slider control to navigate across three dimensions – Year, Quarter and Month.
And apply the below custom expression on the date column.
This customization allows us to change the Time Hierarchy for Date columns. Below is a view of quarterly Sales (by Order Date)
And a monthly Sales view (using Dispatch Date)