Changing labels used as title on pie chart

11 views
Skip to first unread message

Phil Ashworth

unread,
Oct 31, 2017, 4:58:28 AM10/31/17
to Information Workbench Discussions
Hi IWB helpers

I have a pie chart that renders as follows 

The Title that it has used is the label of the resource.
However I want to use another property as the title in the display.
But I cannot seem to get it to work whatever I try.

The basic widget config below
Could you tell me how I can alter it so that the ?label value is used in the display 

{{#widget: PieChart | 
 input = 'BU'
 | output = {{ 'count' }}
 | query = 'select ?BU ?label (count(?Brand) as ?count) where {
?Brand a product-schema:Brand .
?Brand product-schema:hasCountry <http://domain.com/product360/data/country/gbr> .
?Brand product-schema:hasBusinessUnit  ?BU   .
?BU product-schema:displayName ?label .
} group by ?BU  ?label '
 | startEffect = 'elastic'
 | enableLinks = true
 | variableConfiguration = {{  }}
 | repository = 'Product360'
 | asynch = true
}}

Thanks in advance

Phil

Andreas Schwarte

unread,
Nov 2, 2017, 3:47:48 AM11/2/17
to iwb-dis...@googlegroups.com

Hi Phil,

 

there is currently no way to retrieve the display string as part of the query or to configure the label property in the widget configuration.

 

As an alternative workaround approach you can change the system configuration setting “labelProperties” to interpret your property as label. Note that multiple properties can be defined here. See [1] for details

 

Hope this helps,

Andreas

 

[1] http://help.fluidops.com/resource/Help:SystemConfiguration#Labels

--
You received this message because you are subscribed to the Google Groups "Information Workbench Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iwb-discussio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Ashworth

unread,
Nov 2, 2017, 11:41:32 AM11/2/17
to Information Workbench Discussions
Thanks for the info Andreas...

One question further... 
How does the system configuration setting “labelProperties” work.
If I give it a list of properties , does it try to find them in a particular order and the first to find is the one it uses.
Or does it try to find them all and just use and arbitrary one.

Cheers
Phil

Andreas Schwarte

unread,
Nov 3, 2017, 4:09:23 AM11/3/17
to iwb-dis...@googlegroups.com

Hello Phil,

 

the labelProperties setting defines a list of properties / predicates which are used to lookup the label.

 

When a label for a resource is required (and it is not available in the label cache) we try to retrieve a label from the database. For this we use a single query with all defined label properties and take the best fitting match (e.g. language). Typically (but not guaranteed) this is in the order as defined in labelProperties, so the first label property has precedence.

 

Best,

Andreas

Reply all
Reply to author
Forward
0 new messages