This is a migrated thread and some comments may be shown as answers.

I need a bar line (chart ) column within grid

2 Answers 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Krishna
Top achievements
Rank 1
Krishna asked on 27 May 2009, 04:39 PM
Hi,

i have requirement where i should show one column with a  single bar for each row .. below gives little idea on how it should look
http://img0.gmodules.com/ig/modules/bar-chart.png

but for each row should have one bar which show 3 numbers (quantities) with different colors.

i dont require any x or y axis it can be a line or lable with 3 different colors filled in it depending on the numbers provided within the row cell.

is there any way to get that within the grid? or is there any logic so that i can fill the row cell with the colors?

Please help me if any one have done similar thing

thanks
-Krishna


2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 30 May 2009, 12:14 PM
Hi Krishna,

You could achieve it with a div in the ItemTemplate of a GridTemplateColumn. You could add the div there and set its width in pixel for instance. You can add three more divs into this and set their background color to the corresponding colors. Then you could set dynamically the width of each inner div in percentage depending on the retrieved data. 
Additionally, I am attaching a sample project illustrating similar scenario. 

Regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Krishna
Top achievements
Rank 1
answered on 01 Jun 2009, 06:40 PM
Lana,

Thanq very much for the suggesion.

I decided to go with the Div inside the cell..

Thanks a lot for the sample code..

-Krishna
Tags
Grid
Asked by
Krishna
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Krishna
Top achievements
Rank 1
Share this question
or