Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jesusdiazrivero
Partner - Contributor
Partner - Contributor

Applying themes to Visualizations in a Mashup

I am currently developing a mashup which uses the Visualization API to create visualizations on the fly. One of these charts is a line chart with

    Dimension: MonthYear

    Measure 1: Sales for selected MonthYear values

    Measure 2: Sales for one year before selected MonthYear values or Forecasted sales for selected MonthYear values (depends on      toggles)

Due to the requirements specified by the client, the colors of these two lines have to be changed.

After trying many things, I've reached the conclusion that the only way to get this to work is using custom themes. I've managed to create one which works correctly with charts created in my application, but I'm struggling when I try to apply the theme to visualization in my mashup.

I've tried using the function qlik.theme.apply(...) and, even though the callback function returns true, I see no change. Does this function have any limitations? Such as having to be called in a specific order or something?

Note that I cannot modify the require.js file on the server since there are many independent applications running.

Any solution or workaround would be greatly appreciated.

3 Replies
jesusdiazrivero
Partner - Contributor
Partner - Contributor
Author

Further attempts have revealed that issue lies with the second measure. If I only use one measure in my line chart, the theme applies correctly. However, when I put a second one, the theme reverts to Qlik Sense basic. This also happens in the applications.

This seems to me like it might be a bug.

tracysnow
Partner - Contributor
Partner - Contributor

copy require.js to you mashup forder, change it, but as I know, sense new version can only use theme to change object style, cannot change require.js any more. see it https://sensetheme.com/edit

LCauch
Contributor III
Contributor III

Hey @jesusdiazrivero,

Are you talking about ODAG ? I have the same issue as you, how did you do it in the end ?

Thanks,

Leo