{"id":17137861,"url":"https://github.com/tower1229/vue-tree-chart","last_synced_at":"2025-04-08T12:09:50.324Z","repository":{"id":44443394,"uuid":"143362206","full_name":"tower1229/Vue-Tree-Chart","owner":"tower1229","description":"A Vue component to display tree chart","archived":false,"fork":false,"pushed_at":"2024-02-08T16:05:02.000Z","size":865,"stargazers_count":585,"open_issues_count":14,"forks_count":171,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-01T11:02:43.620Z","etag":null,"topics":["chart","tree","tree-chart","vue","vue-component"],"latest_commit_sha":null,"homepage":"https://refined-x.com/Vue-Tree-Chart/","language":"Vue","has_issues":true,"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/tower1229.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-03T01:30:49.000Z","updated_at":"2025-03-19T14:38:23.000Z","dependencies_parsed_at":"2022-08-04T11:30:22.258Z","dependency_job_id":"242dccaf-d7c9-4e4b-bdae-839fb8cb4b5e","html_url":"https://github.com/tower1229/Vue-Tree-Chart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tower1229%2FVue-Tree-Chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tower1229%2FVue-Tree-Chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tower1229%2FVue-Tree-Chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tower1229%2FVue-Tree-Chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tower1229","download_url":"https://codeload.github.com/tower1229/Vue-Tree-Chart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"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":["chart","tree","tree-chart","vue","vue-component"],"created_at":"2024-10-14T20:08:08.560Z","updated_at":"2025-04-08T12:09:50.307Z","avatar_url":"https://github.com/tower1229.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [中文](README_CN.md)\n\n# vue-tree-chart\n\n[![npm](https://img.shields.io/npm/v/vue-tree-chart.svg)](https://www.npmjs.com/package/vue-tree-chart/) [![license](https://img.shields.io/github/license/tower1229/Vue-Tree-Chart.svg)]()\n\n\u003e :deciduous_tree: A Vue component to display tree chart\n\n![logo](https://refined-x.com/asset/vtc-logo.png)\n\nVue3.x version [is here](https://github.com/tower1229/Vue-Tree-Chart/tree/vue3)\n\n## Install\n\n```bash\nnpm i vue-tree-chart --save\n```\n\n## Usage\n\nin template:\n\n```html\n\u003cTreeChart :json=\"treeData\" /\u003e\n```\n\nin script:\n\n```js\nimport TreeChart from \"vue-tree-chart\";\n\nexport default {\n\tcomponents: {\n    \tTreeChart\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttreeData: {\n\t\t\t\t...\n\t\t\t}\n\t\t}\n\t}\n\t...\n```\n\n## Prop\n\n### json\n\nComponent data to support those field：\n\n```text\n- name[String] to display a node name\n- image_url[String] to display a node image\n- children[Array] node`s children\n- mate[Array] node`s mate\n- class[Array] node`s class\n- extend[Boolean] show/hide node`s children, default True\n```\n\nExample：\n\n```js\n  {\n    name: 'root',\n    image_url: \"https://static.refined-x.com/avat.jpg\",\n    class: [\"rootNode\"],\n    children: [\n      {\n        name: 'children1',\n        image_url: \"https://static.refined-x.com/avat1.jpg\"\n      },\n      {\n        name: 'children2',\n        image_url: \"https://static.refined-x.com/avat2.jpg\",\n        mate: [{\n          name: 'mate',\n          image_url: \"https://static.refined-x.com/avat3.jpg\"\n        }],\n        children: [\n          {\n            name: 'grandchild',\n            image_url: \"https://static.refined-x.com/avat.jpg\"\n          },\n          {\n            name: 'grandchild2',\n            image_url: \"https://static.refined-x.com/avat1.jpg\"\n          },\n          {\n            name: 'grandchild3',\n            image_url: \"https://static.refined-x.com/avat2.jpg\"\n          }\n        ]\n      },\n      {\n        name: 'children3',\n        image_url: \"https://static.refined-x.com/avat.jpg\"\n      }\n    ]\n  }\n```\n\n## Event\n\n### click-node(node)\n\nClick on the node triggered, receive the current node data as a parameter\n\n## Run a demo\n\n```bash\nnpm run serve\n```\n\n## Build\n\n```bash\nnpm run build-bundle\n```\n\nCopyright (c) 2017-present, [前端路上](http://refined-x.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftower1229%2Fvue-tree-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftower1229%2Fvue-tree-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftower1229%2Fvue-tree-chart/lists"}