Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get bar of different colors in Bar chart?

Hi all,

I have attached a QVW file where I want the bar to be of different colors.

Note: I can't color code the cities as they are too many in number.

         I can't display the names of the cities as in real they are too big to be accommodated near each bar.

The only option I am left with is to display the names of cities as legends, but that to is not possible. I have an alternate for displaying the legends now I just want my bars to show different colors.

Please please help me out.

Regards

Sagar Gupta

6 Replies
johnw
Champion III
Champion III

This is probably too simplistic, but you will get different-colored bars if you use this as the background color expression for the first expression:

rgb(rand()*255,rand()*255,rand()*255)

Mind you, if you're going to use random colors, you could assign random colors to the cities during the load and thus "color code the cities" as you mentioned, but without the headache of doing it manually.

Given what little information I have, though, it seems like you'd be best off just turning the whole chart sideways on the style tab.  Then there's plenty of room for city names.

Not applicable
Author

Hi John,

First of all Very thanks for the reply.

Is it possible to fix the colors as in: 

the 10 bars will have their own color always.

Regards

Sagar Gupta

MayilVahanan

Hi

Check the attached file

Edit:

Now check the attached file..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi all,

I rectified the issue.

What i did is, I colorcoded the expression background for the 10 rows with the first 10 colors which are present in color tab

Regards

Sagar Gupta

Anonymous
Not applicable
Author

hello i have a similar problem but in my case i have channels and i see their statistics, meaning the channel names are shown up more then once how can i manage the colors in this situation? --> Dynamic coloring for unknown number of bars

Anonymous
Not applicable
Author

hello i have a similar problem but in my case i have channels and i see their statistics, meaning the channel names are shown up more then once how can i manage the colors in this situation? --> Dynamic coloring for unknown number of bars