Highlighting Specific Cells in Table Chart
- This topic has 2 replies, 2 voices, and was last updated 11 years, 5 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › SPJS Charts for SharePoint › Highlighting Specific Cells in Table Chart
I’m sure there’s a simple way to do this, but I have had no luck trying to highlight all cells in my table chart when the string “Pending” is contained within the cell.
Here is what I have tried so far:
1) ColorFormat – using the addRange option and value of “Pending, Pending, red, yellow”

2) jQuery + CSS code in the CEWP after all AJAX calls are done
<script type="text/javascript">
$(document).ajaxStop(function(){
$(".google-visualization-table-td:contains('Pending')").css("color", "red");
});
</script>
None of the above methods works. What might be the recommended approach?
Thanks for your help!
Hi,
ColorFormat expexts a number range so I guess you must use script. I have tested this and it works, but you must change the timeout to ensure your table is ready:
setTimeout(function(){
$("td.google-visualization-table-td:contains('Pending')").css("color","red");
},3000);
Hope this helps,
Alexander
Thanks, Alexander — using setTimeout works.