Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
premacharya0903
Contributor II
Contributor II

Custom Coloring 'Others' category in a vizlib combo chart.

I have a combo bar chart with 3 measures (2 bar , 1 line)   and 1 dimension . Measures are color coded - lets say green for 1st bar and red for 2nd bar. 

The chart would display top 5 dimensions and rest all clubbed into others. By default others are colored as grey . 

Is there any workaround to color code both the bars for Others.It should also be color coded same as above for  the measures.(green for 1st bar and red for 2nd bar. )

The others would be dynamic based on filter selection , hence no static or hard coding  'others' category in script.

#Bar

2 Solutions

Accepted Solutions
JandreKillianRIC
Partner Ambassador
Partner Ambassador

Hi @premacharya0903 

 

I tried doing this using css. But in the end I cant get this to work. However, You can get this to work by applying this in a theme. If you head over to https://sensetheme.com/ you can create a custom theme. There is a section for the "otherColor". 

JandreKillianRIC_0-1736860897946.png

Regards

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

View solution in original post

premacharya0903
Contributor II
Contributor II
Author

Hi @JandreKillianRIC  , 

Thanks for your suggestion.

Tried CSS, it worked  a single bar , but since i had 2 measures same color code was applied to both the measures . 

Explored using chart scripting , i was able to update the 'others' as an exclusive dimension value , however customization was limited (or maybe i am still to explore ) .

Unfortunately had to rely back on using aggr+rank for dimension , since this was a vizlib chart i am lucky to have the option to color the measure individually .

However ,with the calculated dimension , dynamic viztips is out of question for now (but that is a problem for another day ) . 

View solution in original post

3 Replies
JandreKillianRIC
Partner Ambassador
Partner Ambassador

Hi @premacharya0903 

 

I tried doing this using css. But in the end I cant get this to work. However, You can get this to work by applying this in a theme. If you head over to https://sensetheme.com/ you can create a custom theme. There is a section for the "otherColor". 

JandreKillianRIC_0-1736860897946.png

Regards

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

JandreKillianRIC
Partner Ambassador
Partner Ambassador

Hi @premacharya0903 

 

Another solution might be to use an Aggr and Rank as Dimension. 

Then you can use this for the colors as well. 

Dimension

=IF(
Aggr(
    Rank(Sum(Value)), [Year-Month])<=3, 
        [Year-Month],
            'New Others Field')
 
Color Expression
=IF(
Aggr(
    Rank(Sum(Value)), [Year-Month])<=3, 
        Green(),
            Blue())
 
JandreKillianRIC_0-1736861600269.png

 

Might need a bit more work to get multiple colors but this is the idea. 

 

Regards

Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn

premacharya0903
Contributor II
Contributor II
Author

Hi @JandreKillianRIC  , 

Thanks for your suggestion.

Tried CSS, it worked  a single bar , but since i had 2 measures same color code was applied to both the measures . 

Explored using chart scripting , i was able to update the 'others' as an exclusive dimension value , however customization was limited (or maybe i am still to explore ) .

Unfortunately had to rely back on using aggr+rank for dimension , since this was a vizlib chart i am lucky to have the option to color the measure individually .

However ,with the calculated dimension , dynamic viztips is out of question for now (but that is a problem for another day ) .