COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: coghelp on 14 Jun 2010 10:40:07 PM

Title: Inline Bar chart very interesting question
Post by: coghelp on 14 Jun 2010 10:40:07 PM
Hi All,

Environment 8.4

I have a requirement where in I need to provide inline bar chart with in list report, bar is the amount of % left or completed. I tried with below html code but it didn't work. Let me give some more details, I have a actual and scheduled information, I need to show bar chat how much of its left in scheduled in corresponding to actual if it make sense . lets take example if scheduled is 100 and actual is 40 then I need to show 40 in red and 60 in green, if actual is 75 the 75% of the bar should be red and 25% in green. I need to show this in single bar. Please let me know if you have any idea. Thanks !

<script>

barlength=100*( parseInt('xx%')/100)

myBar='<div style="background-color:red; width:' +barLen+'; height:10"></div>'

document.write(myBar)
</script> .
Title: Re: Inline Bar chart very interesting question
Post by: cognosjon on 15 Jun 2010 02:04:10 AM
Could you not just use a stacked bar chart to accomplish this and define the coulours pallet?
Title: Re: Inline Bar chart very interesting question
Post by: coghelp on 15 Jun 2010 07:31:27 AM
I used it but shows 100% for all  :o may be I am not using it properly, please let me know how I need to use it?

Please who ever is suggesting the idea please give step by step instructions
Title: Re: Inline Bar chart very interesting question
Post by: coghelp on 16 Jun 2010 12:25:19 AM
Nobody here who can help me??