How to present percentage graphically in Excel? - conditional-formatting

I am working on a customer satisfaction questionnaire and would like to present the results graphically, something like in the picture below:
A click on 0% should automatically colour a cell in red, 25% should be presented in orange, 50% are highlighted in yellow, etc.
Does anyone have an idea how to handle this?
Many thanks and loads of coffee to you all!

At a high level, this is very simple.
Assuming you know how to associate the value of the option group to a cell, add conditional formatting to each cell (that is underneath the option button ) that sets its background color to the appropriate color based on the value of the associated cell.
For example...

Related

Colors[4] not showing color selection on Front Panel

I am trying to set the color of an indicator to different colors based on different values, like 1 = red, 2 = blue etc. Using guidance from a Youtube video (accessible using this link: https://www.youtube.com/watch?v=czUmPQmKmGU), I have created a Colors[4] control for the indicator I have after changing it to the "write" function.
The Problem on the front panel is that I am getting a control with numbers instead of a color box where I can select the colors to show based on the value. This was the control I got instead.
This is the control I am trying to achieve (below):
Is there any way that I can get the color box on my control instead of the number controls? I am not sure if it can be changed through a control on the front panel or something but what I have tried so far keeps leading me back to this problem.
Any advice is much appreciated
A color box control is just a U32 number (three bytes for RGB and one which is always 0), which is why that's what you get.
There is a right click plugin which adds a replace with color box option directly to the right click menu of unsigned 32 bit numbers, but I don't remember if it ships with LV or not.
If you don't have that, you can always just right click the indicator inside the cluster, select replace and navigate the palettes to find the color box. You can also copy a color box and then select the indicator and paste, which replaces the selected control.
The color[4] is actually an array of 4 colors (UInt32 as Yair said), that define 2 color gradients, one for the 'Off' state, and the other for the 'On' State of the control.
If you want to set the control's color, you will have to define all 4 of them.

Tableau (Highlighted Tabs) - Create color range

I started working with Tableau and want to create a crosstab that displays a measure per customer over the months.
The goal is to Display every value >95 as green, the values from 85-95 as yellow and everything below as red. Is this possible?
Thanks a lot in advance.
So I start with a view of this
Then I create a dummy calculated field which will represent my color scheme
I drag the Value Color Sum to the color, then the numbers will be colored.
To change the color, click on the color button.
To create the "background", I take the "Number of Records" and drag it to Size.
Then I take the measure and change the marks from "Automatic" -> "Bar". I also click on the small white triangle and choose: "Measure" -> "Minimum" to make the bars in the background to fill up the whole cell.
Then I left-click on the size button and drag the slider to the right to make the bar fill the height.
Video of above steps can be found here: How to Conditionally Format Cell Background Color in Tableau
Depending on your data you might need to adjust your measure to make it aggregate, it depends on your data.
For example, my data looks like this:
If I don't aggregate the data the result will be as picture below, since the color will not be applied to the sum of customer A, rather it will be applied to each "row" and therefore the cell will be RED instead of GREEN (See value 110 for January, Customer A).
By aggregating the value I can direct my color scheme to this variable which make the result as I desire.
In this case I used a LOD on customer and Month to create my Sum Value:
{Fixed [Customer], [Month]: SUM([Value])}

How to change the color of bar chart in Pentaho Report designer based on the value

I have a simple requirement wherein I would like to change the color of the bar chart in Pentaho report designer based on the value of y-axis. In case the number is negative, I would like to show it as a red bar, in case the value is positive, I would like to show this as a green bar.
I took a look at the following example but the color changes based on the values proximity to a goal of 1 million. I am pretty new to bean shell scripting and would really appreciate any inputs on the same: http://type-exit.org/adventures-with-open-source-bi/2011/05/dynamic-coloring-of-prd-charts/#downloads
Thank you,
Malavika

Custom coloring a gridcell in dijit.calendar and keeping it persistent

I am using dojo 1.6 and using dijit.calendar in a project and it's working great except for the goal of colorizing a selected grid cell. I have three innerHTMLs that are being manipulated by the calendar clicks. No problem there.
dijit.calendar's behavior is to highlight a gridcell (calendar day) as blue when clicked and when another gridcell is clicked, it then turns that blue.
What I'd like to do is colorize the cell a custom color when it's clicked and have it persistent.
Specifically the calendar is for a project that has an official date (blue), start date (green) and an end date (red).
I'm not even aware that there is a way to colorize a specific gridcell in dijit.calendar. Has anyone successfully done this or have a pointer to send me in the right direction?
Edit below:..
OK folks, I have a pretty good lead on where to go with this thanks to Philippe below. Philippe's solution will color the cell EXACTLY as intended (so he's got the answer karma). Turns out that if a selected grid cell is red and I switch to the month to pick a subsequent date, the cell stays red.
I have most of it figured out. I can get, say, the first couple of dates successfully colored but if I have to do something like put in a third date in the next month and change the calendar, the cells stay colored. So there's going to have to be a way to change my color change to a distinct value that corresponds with the actual date.
I know that onChange that the only argument returned is the Date itself like this (using debug.console in Firebug).....
[Date {Wed Jan 18 2012 00:00:00 GMT-0500 (EST)}]
I inspected the code through Firebug and noticed in that same cell that the code looks like this....
<td role="gridcell" class="dijitCalendarSelectedDate dijitCalendarCurrentMonth dijitCalendarDateTemplate" dijitdatevalue="1326866400000" style="background-color: green;" tabindex="0"><span class="dijitCalendarDateLabel">18</span></td>
That distinct value seems to be "dijitdatevalue".
I suppose I could follow a chain of ......
on click, store the "dijitdatevalue" of the first date in a hidden field (as well as the second and third dates)
Then go back and set the background-color of the corresponding dijitdatevalue to blue, green or red.
Question now is how to return the dijitdatevalue string to a hidden field. I'll update this post again as I figure out the answer.
Janie
If you look at the widget code you'll see a private method called _onDayMouseDown which is responsible for turning the cell blue...
You can add your custom code to that function through dojo.connect, like this :
dojo.connect(dijit.byId('calendar1'), "_onDayMouseDown", function(/*Event*/ evt){
var node = evt.target.parentNode;
dojo.style(node, "backgroundColor", "green");
});
Otherwise, if you use dojo 1.7, you may give a try to the MultiSelectCalendar

how to change the background color of an item in a listbox when its string value is equal to something?

i have a listbox that contains the words "week1", "week2", ..... all the way up to "week52" and when i select a week from the listbox it will retrieve a value from a mysql database that will represent a progress bar value. my progress bar has a range of 0-120 and i would like to have all the weeks that have values higher than 100 to be highlighted or marked somehow, in the listbox. so my question is, "is there a way to set the background color of certain weeks in the listbox to orange based on the value that they represent on the database?
for example for "week1", the value is 114, so when the listbox loads, i want the background color of the item "week1" in the list to be orange (indicating that it's current value is higher than 100)? i know that this requires me to implement a user defined drawing function for the listbox items but i dont know where i would even start. i would like this to be somewhat automatic so that it checks the values and changes the background colors of any value higher than 100, instead of me specifying a name of the item.
Thanks in advance!
I don't believe you can do this with a Listbox (at least not without creating your own implementation/subclassing/overriding/whatever of a Listbox).
Pretty sure you could do it with a ListView (in Detail mode), though, if that helps.