Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi everyone,

I have a peculiar challenge. Perhaps, it is very tricky to achieve.

I have to visualize data like this : https://drive.google.com/file/d/0B9nOduJIKxoeQWI5Z0g0aDhzSk0/view?usp=sharing

This a squared Treemap chart. Well I have to build a WPF application which visualize certain data using this squared treemap chart. Unfortunately, I dont have open source library to use like an api to visualize in the above way.

Hence, I came up with an idea.

Idea is this,

1. create a grid.
2. If i have "n" number of data items. Then, create a 'n' number of boxes ( divide grid into rows and columns ).
3. And then loop the rows and columns and change the properites of each cell.

However, I am finding difficulty in arriving a logic to divide the grid based on 'n' number.

In above pic, I have 150 machines, out of which some are km type and some are pu type machines. hence, in order to visualise the data of 150 machines i need 150 boxes inside grid. Now, my question is what is the logic for this.

for 150 machines i need 150 boxes in side grid. and this 150 is a variable its value is given dynamically and the cells inside grid should be created dynamically.

If, anyone has an idea for this logic can share with me. Or if u know/have any opensource library to use sqaured treemap chart in wpf please help me with it.

Thank you very much.
Posted

1 solution

Option 1

If your Grid Height and width is fixed. then use
custom gridview class implement gridview
and override onrowcreating method there u can set the height and width of the row.\

Optio 2: Suppose U have a gridview which is inside the Main grid based on the screen size get the actual width and height then divide the rows and column and set height and width for each.

there is keyword used sharedsizegroup
 
Share this answer
 
Comments
Member 11605512 19-May-15 5:43am    
thanks vishy,

any idea about open source library to get treemap chart in wpf?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900