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