Gradient color in bar chart based on start/end text of value title
Searched and found Gradient color in bar/column/line/area chart - Sisense Community
Help always so appreciated!
Use case is having 5 levels of engagement where a customer could enter at any level and then be currently still at that level or at a deeper level. Each level has a color assigned. The values in the bar widget count the customers who entered at a given level and are currently at a given other level. The values are named {entryLevel} - {currentLevel}
For the value named "Level A - Level B" the bar would start at the color assigned for Level A and end at the color for Level B.
For a value named "Level B - Level E" the bar would start at the color for Level B and end at the color assigned for Level E.
Thanks in advance!
Chris Wallingford
16 comments
DRay
Hi wallingfordce,
Do you still need help with this?
Chris Wallingford
OPHi DRay - there wasn't a response after this comment, so I don't yet have a solution.
Chris Wallingford
OPI don't have a solution, but this was also a nice-to-have. I can use the UI to select the target/ending color for each bar and leave the starting color out of it, and then document that.
DRay
Should we ping harikm007 to see if he can respond to your last post about the seriesName?
Chris Wallingford
OP:) I don't want to pester someone who is and has been so giving of their time. The community notification of my response was sent, and my personal community platform etiquette assumes they either don't have time to respond or don't have a solution.
DRay
I hear that. Fortunately, I have spoken with him personally a couple of times, so I feel comfortable pinging him. 😄
DRay
Hi wallingfordce,
Do you still need help with this?
Hari KM
Hi wallingfordce ,
Please try the below script and let me know if you are looking for something like this:
- Hari
Chris Wallingford
OPLove that and looks like the right idea. Does it matter that I don't have a field on Categories or Break By, because I'm not seeing this have any effect, and throwing a console.log(categoryName) in there doesn't output anything.
Hari KM
The script needs to be adjusted slightly if the Categories or Breakby fields are not present. Here's the updated version.
-Hari
Chris Wallingford
OPCloser, and really appreciate it. Seems like it's stuck only returning the first seriesName for all series
logging seriesName to console right after it's set each time shows all the different series names, but logging it inside the seriesValue.data loop logs the first series name every time.
DRay
Hi harikm007,
Thank you for your help so far. You have been great, as always! Are you able to help with this last bit?
Hari KM
To reproduce the same, can you share a screenshot of the left-side panel of the widget where you added categories and values?
The above script can be applied when there is only Values panel.
Chris Wallingford
OPharikm007
DRay
harikm007, Are you able to continue assisting here? If you like I can find an internal resource to step in. We appreciate the help so far!
DRay
harikm007 Are you able to continue assisting wallingfordce? If you like I can find an internal resource to step in. I appreciate the help so far!