Qlik Community

Integration, Extension & APIs

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

Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

Bar Chart colorByDimension not working with ApplyPatches after November 2019 Update

Hello, I am currently working on an app that uses qdt-components (https://github.com/qlik-demo-team/qdt-components) to create and render charts in a React web app. I have set it up so that a user can control which dimensions are being shown on a chart. When the chart loads, the create() method is called and passed the full property tree of the chart object. When the user changes the dimension of the chart, the setOptions() method is called and I pass the full property tree with the new changes. This has been working fine for the past year. Over the weekend, I upgraded my version of QlikSense from April 2019 to November 2019.

As an example, I have below a grouped bar chart with two dimensions and one measure. Each dimension has a "qAttributeDimension" set up to color the chart by and the "color" property is set to color by the second dimension. When I create the chart, I get this:

This is the correct behavior of the chart. Each bar is colored correctly. Now, when I switch the dimension out for a new one, update the color.byDimensionDef property, and pass the change via setOptions() (ApplyPatches), I get this:


Now the chart is being colored by the first dimension instead of the second. When I try to switch back to the original dimension, the chart is still being colored by the first dimension:



Looking at the RPC calls in the Chrome DevTools, I see the following calls are being made:

I believe the problem is with the GetHyperCubeData call because it is requesting the data to color by for the first dimension instead of the second after an ApplyPatches call. This only seems to affect Bar Charts because I did the same test with a Line Chart and it works fine:


Like I said before, this was working fine until I upgraded to November 2019 and I didn't change anything on my end. I can work around this issue by setting the color property of the affected bar charts to auto. I thought I would just post this bug here in the hopes that it catches the eye of a developer.

Labels (5)
0 Replies