Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
danieloberbilli
Specialist II
Specialist II

Change CurrentSelections object with Visualisation API

Hi,

Is there a way to handle / modify the Qlik CurrentSelections object through the Visualisation API?

I know  I can use the Selection API to create my own viz, but I wonder if I can just change some options on this grey standard selection bar from Qlik.

Thank you

Regards

Daniel 

1 Solution

Accepted Solutions
aaz
Employee
Employee

Hi @danieloberbilli ,

There's a "secret" option for getting the previous dark version of the current selection bar:

// @param {string} [options.variant] - used only when getting 'CurrentSelections', for rendering the "dark" variant. Possible values: "dark". {@x-qlik-visibility private}

app.getObject('elementId', 'CurrentSelections', {variant: 'dark'});

Modifying the CSS by overriding it works, but there's no guarantee that your styles will still work if you upgrade Qlik Sense.

Third alternative is to use the Themes API, while I am not 100% sure how much we support styling the current selection bar.

I hope this helps

View solution in original post

4 Replies
oz_moyal
Creator
Creator

What kind of changes ?

If u show it in a mashup u can make many changes to the design  or hide buttons using css.

aaz
Employee
Employee

Hi @danieloberbilli ,

There's a "secret" option for getting the previous dark version of the current selection bar:

// @param {string} [options.variant] - used only when getting 'CurrentSelections', for rendering the "dark" variant. Possible values: "dark". {@x-qlik-visibility private}

app.getObject('elementId', 'CurrentSelections', {variant: 'dark'});

Modifying the CSS by overriding it works, but there's no guarantee that your styles will still work if you upgrade Qlik Sense.

Third alternative is to use the Themes API, while I am not 100% sure how much we support styling the current selection bar.

I hope this helps

View solution in original post

danieloberbilli
Specialist II
Specialist II
Author

Thank you for your reply, @oz_moyal.  Yes, you are right, I played around with custom css as well but it feels more like a hack 🙂 But I guess that's the only way to visually modify it without rebuilding the object yourself.

Cheers

Dan

 

danieloberbilli
Specialist II
Specialist II
Author

Thank you, @aaz. That's interesting and maybe they extend the API  a bit further in the future. I never looked at the Theme API but will investigate this next. Thanks again for your reply.

Cheers

Dan