{"id":18271971,"url":"https://github.com/yatsu/treemapkit","last_synced_at":"2025-10-23T08:55:06.764Z","repository":{"id":56933477,"uuid":"603562","full_name":"yatsu/treemapkit","owner":"yatsu","description":"TreeMap for Cocoa Touch (iPhone/iPod touch/iPad)","archived":false,"fork":false,"pushed_at":"2012-08-24T06:14:22.000Z","size":199,"stargazers_count":242,"open_issues_count":2,"forks_count":44,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-21T02:34:26.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/yatsu/treemapkit","language":"Objective-C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yatsu.png","metadata":{"files":{"readme":"README.mdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-04-10T05:34:56.000Z","updated_at":"2023-12-25T22:37:03.000Z","dependencies_parsed_at":"2022-08-21T05:20:29.118Z","dependency_job_id":null,"html_url":"https://github.com/yatsu/treemapkit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yatsu%2Ftreemapkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yatsu%2Ftreemapkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yatsu%2Ftreemapkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yatsu%2Ftreemapkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yatsu","download_url":"https://codeload.github.com/yatsu/treemapkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279320,"owners_count":20912865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:39:38.113Z","updated_at":"2025-10-23T08:55:01.725Z","avatar_url":"https://github.com/yatsu.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"TreemapKit\n==========\n\nTreemapKit is a treemap implementation for Cocoa Touch.\nYou can display treemaps in iPhone, iPod touch and iPad.\n\n[Click here to see the simple demo app](http://www.flickr.com/photos/14555412@N05/4507143423/ )\n\n![](http://farm3.static.flickr.com/2302/4507143463_63823457b8.jpg)\n\nLicense\n-------\n\nTreemapKit is provided under the [MIT License](http://github.com/yatsu/treemapkit/blob/master/LICENSE.txt ).\n\nHow to use\n----------\n\n1. Copy TreemapKit folder to your source tree and add it to Xcode project.\n2. Import \"TreemapView.h\" from your code.\n3. Implement both TreemapViewDataSource and TreemapViewDelegate protocols.\n\nClass References\n----------------\n\n### TreemapView\n\n#### reloadData\n\n`- (void)reloadData`\n\nReload the data of the treemap.\n\nCall this method to reload all the data that is used to construct the treemap including cells.\nIf you want to change the cell content, implement `treemapView:updateCell:forIndex:forRect:`.\n\n### TreemapViewCell\n\nA basic implementation of the treemap cell.\nYou can make a sub-class to show more information or images.\n\n#### textLabel\n\n`UILabel *textLabel`\n\nThe label used for the main textual content of the tremap cell.\n\n#### valueLabel\n\n`UILabel *valueLabel`\n\nThe label used to show a value of the cell.\n\n#### index\n\n`NSinteger index`\n\nThe cell index.\n\n#### initWithFrame:\n\n`- (id)initWithFrame:(CGRect)frame`\n\nInitialize the cell with a frame.\n\n### TreemapViewDataSource\n\nThe data source protocol for a TreemapView object.\n\n#### valuesForTreemapView: _(required method)_\n\n`- (NSArray *)valuesForTreemapView:(TreemapView *)treemapView;`\n\nProvides data for a TreemapView as a NSArray.\n\nTree or other data structures are currently not supported.\n\n#### TreemapView:cellForIndex:forRect: _(required method)_\n\n`- (TreemapViewCell *)treemapView:(TreemapView *)treemapView cellForIndex:(NSInteger)index forRect:(CGRect)rect;`\n\nReturns a cell object for the specified place.\nYou need to create a TreemapViewCell and return it.\n\n#### treemapView:separatorWidthForDepth:\n\n`- (float)treemapView:(TreemapView *)treemapView separatorWidthForDepth:(NSInteger)depth;`\n\nReturns a separator width for the specified depth.\nIf you don't need to change the width for the specified depth, return 0.\nThe default separator width is 0.\n\n#### treemapView:separationPositionForDepth:\n\n`- (NSInteger)treemapView:(TreemapView *)treemapView separationPositionForDepth:(NSInteger)depth;`\n\nNormally TreemapView separate two rectangles with calculating the areas, but if you want to separate two groups manually, return the index of the cells.\nIf you don't need to change the separation position for the specified depth, return NSIntegerMax.\n\n### TreemapViewDelegate\n\nThe delegate of a TreemapView object.\n\n#### treemapView:tapped:\n\n`- (void)treemapView:(TreemapView *)treemapView tapped:(NSInteger)index;`\n\nTells the delegate that the specified cell is tapped.\n\n#### treemapView:updateCell:forIndex:forRect:\n\n`- (void)treemapView:(TreemapView *)treemapView updateCell:(TreemapViewCell *)cell forIndex:(NSInteger)index forRect:(CGRect)rect;`\n\nTells the delegate that the specified cell should be updated.\nYou need to update the cell content manually in this method.\n\nLinks\n-----\n\n* [@chris124's three20 branch](https://github.com/chris124/treemapkit/tree/three20 )\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyatsu%2Ftreemapkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyatsu%2Ftreemapkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyatsu%2Ftreemapkit/lists"}