Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
angelfer90
Contributor
Contributor

Give and change color to axis lines and labels in bar charts / combo charts

Hi everybody and thanks in advance.

 

Is it possible to give / change colors to axis lines inside bar charts / combo charts?

For example, I highligted in yellow the parts I want to change.

Could I change the labels on the right to be the same colour as the measure they are refering about?

Also, could I change the color of the axis on the left in order to give it the same colour as the measure is representing?

angelfer90_0-1658139792621.png

 

Thanks

 

Labels (1)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

I believe so yes, because the theme is applied to all type of objects that the modifications refer to (e.g. All Bar Charts, all Combo Charts etc.).

 

You can try submitting a feature request [1] and elaborate in detail as to why specifying custom theme to be applied on specific object (based object ID), would be beneficial for you and other users. However, for the time being, the solution mentioned above, seems to be the only straightforward solution. 

 

I hope that this information was helpful. 

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

5 Replies
angelfer90
Contributor
Contributor
Author

If it´s not possible, anyone knows any extension that enables Qlik Sense to perform this changes?

Andrei_Cusnir
Specialist
Specialist

Hello,

 

You can change the colors by applying a custom theme. However, you can change a single color for all labels, all values etc. It appears that you can't change the values per measure/dimension etc.

 

Here is an example:

1. You can create a custom theme [1]

 

Example code:

[...]

    "object": {
     "barChart": {
       "backgroundColor": "@light",
       "axis": {
         "title": {
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif",
           "color": "red"
         },
         "label": {
           "name": {
             "color": "red",
             "fontSize": "@font-normal",
             "fontFamily": "sans-serif"
           }
         },
         "line": {
           "major": {
             "color": "@default"
           },
           "minor": {
             "color": "@default"
           }
         }
       }
     },
     "comboChart": {
       "backgroundColor": "@light",
       "title": {
         "main": {
           "color": "@default",
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif"
         },
         "subTitle": {
           "color": "@default",
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif"
         },
         "footer": {
           "color": "@default",
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif",
           "backgroundColor": "@light"
         }
       },
       "axis": {
         "title": {
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif",
           "color": "red"
         },
         "label": {
           "name": {
             "color": "green",
             "fontSize": "@font-normal",
             "fontFamily": "sans-serif"
           }
         },
         "line": {
           "major": {
             "color": "green"
           },
           "minor": {
             "color": "blue"
           }
         }
       },
       "legend": {
         "title": {
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif",
           "color": "blue"
         },
         "label": {
           "fontSize": "@font-normal",
           "fontFamily": "sans-serif",
           "color": "purple"
         }
       }
     }
   }

[...]

 

2. Apply the theme in the app's configuration

3. Now you should see the changes:


 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 
 

---

[1] https://help.qlik.com/en-US/sense-developer/May2022/Subsystems/Extensions/Content/Sense_Extensions/C...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
angelfer90
Contributor
Contributor
Author

Thank you for your reply Andrei,

It seems a good approach, but I guess that this kind of solution is going to affect to al bar/combo charts that could have in the whole report, Am I correct?


Andrei_Cusnir
Specialist
Specialist

I believe so yes, because the theme is applied to all type of objects that the modifications refer to (e.g. All Bar Charts, all Combo Charts etc.).

 

You can try submitting a feature request [1] and elaborate in detail as to why specifying custom theme to be applied on specific object (based object ID), would be beneficial for you and other users. However, for the time being, the solution mentioned above, seems to be the only straightforward solution. 

 

I hope that this information was helpful. 

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
jamshed
Contributor II
Contributor II

Great, it solve my problem