{"id":32265558,"url":"https://github.com/mbaez/map3","last_synced_at":"2026-02-23T10:16:39.726Z","repository":{"id":58241001,"uuid":"59233044","full_name":"mbaez/map3","owner":"mbaez","description":"Zoomable treemap","archived":false,"fork":false,"pushed_at":"2017-02-22T18:03:50.000Z","size":327,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-24T04:38:06.980Z","etag":null,"topics":["d3plus","opendata","treemap","visualization"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbaez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-19T18:47:49.000Z","updated_at":"2017-02-22T18:03:51.000Z","dependencies_parsed_at":"2022-08-31T00:22:35.377Z","dependency_job_id":null,"html_url":"https://github.com/mbaez/map3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbaez/map3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaez%2Fmap3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaez%2Fmap3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaez%2Fmap3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaez%2Fmap3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbaez","download_url":"https://codeload.github.com/mbaez/map3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaez%2Fmap3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["d3plus","opendata","treemap","visualization"],"created_at":"2025-10-22T21:16:25.147Z","updated_at":"2026-02-23T10:16:39.719Z","avatar_url":"https://github.com/mbaez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Map3\nJavascript library to implement a interactive zoomable treemap.\n\n\n## Usage\nBelow is quick example how to use :\n\n*Download the latest version library and include it in your html.*\n\n```html\n\u003cscript src=\"js/jquery.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/d3.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/d3plus.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/map3.js\"\u003e\u003c/script\u003e\n\u003clink href=\"map3.css\" rel=\"stylesheet\"\u003e\n\n```\n\n*Add a container in your html :*\n\n```html\n...\n\u003cdiv id=\"treemap\"\u003e\u003c/div\u003e\n```\n\n*This code build a simple treemap*\n```javascript\n...\nvar viz = new Map3({\n    container: \"#treemap\",\n    label: \"value\",\n    size: \"size\"\n});\n\nviz.data(vizData);\n```\n\n## Options\nThe available configuration options from a treemap:\n\n#### options.container\nType: `String`\n\nContainer where the list will build. \n\n\n#### options.label\nType: `Array|String`\n\nThe json attribute name that determines the label of the box.\n\n#### options.size\nType: `Array`\n\nThe json attribute name that determines the size of the box.\n\n#### options[levels]\nType: `Array|String`\n\nThe Array of attributes that define the hierarchy of treemap.\n\n#### options[time]\nType: `d3plus.time`\n\nDefine the timeline of the treemap. [See d3plus](https://github.com/alexandersimoes/d3plus/wiki/Visualizations#time-false--string--function--object-)\n\n#### options[locale]\nType: `Options`\n\n* `{String}region`:  [See d3plus location](https://github.com/alexandersimoes/d3plus/wiki/Localization).\n* `{Object}translate`: the translation map.\n        \nSupport specifying a locale to use for translating common interface words and phrases into a different language.\n\n\n```javascript\nvar viz = new Map3({\n    container: \"#treemap\",\n    ...\n    locale: {\n        region: \"es_ES\",\n        translate: {\n            \"size\": \"Monto\"\n        }\n    }\n});\n```\n\n## Functions\nThe available functions to interact with the treemap:\n\n#### Map3.data(data)\nType: `Function`\n* `{Array}data`: the visualization data.\n\nSets the data associated with your visualization.\n\n```javascript\nvar vizData =  [{\n    \"value\": \"Data1\",\n    \"size\": 2065724632,\n}, {\n    \"value\": \"Data2\",\n    \"size\": 141765766652,\n}, {\n    \"value\": \"Data3\",\n    \"size\": 48130171902,\n}];\n\nvar viz = new Map3({\n    container: \"#treemap\",\n    label: \"value\",\n    size: \"size\"\n});\n\n//do something\n\n//setting data\nviz.data(vizData);\n```\n#### Map3.redraw(data)\nType: `Function`\n* `{Array}data`: the visualization data.\n\nRedraw the visualization with new data.\n\n#### Map3.config(options)\nType: `Function`\n\n* `{Object} options`: the value to format.\n\nWrapper method for [d3plus.config](https://github.com/alexandersimoes/d3plus/wiki/Visualizations#config-object-).\n\n```javascript\nvar viz = new Map3({...});\n\nviz.config({\n    color: {\n        scale: [\n            \"#fdae6b\",\n            \"#EACE3F\",\n            ...\n            \"#e099cf\",\n            \"#889ca3\"\n        ]\n    }\n});\n\n//setting data\nviz.data(vizData);\n```\n\n#### Map3.on(event, handler)\nType: `Function`\n\n* `{String}event`: the name of the event.\n* `{Function}handler`: handler function.\n\nThe events available are:\n\n* `drill-down` : triggered when a box of the multilevel treemap is clicked.\n* `drill-up` : triggered when a element of breadcrumb is clicked.\n\n```javascript \nvar viz = new Map3({...});\n\nviz.on(\"drill-down\", function (d) {\n    //do something\n    console.log(d);\n});\n\nviz.on(\"drill-up\", function (d) {\n    //do something\n    console.log(d);\n});\n//setting data\nviz.data(vizData);\n```\n\n## Want to contribute?\n\nIf you've found a bug or have a great idea for new feature let me know by [adding your suggestion]\n(http://github.com/mbaez/3map/issues/new) to [issues list](https://github.com/mbaez/3map/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbaez%2Fmap3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbaez%2Fmap3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbaez%2Fmap3/lists"}