{"id":15755201,"url":"https://github.com/caohuilin/d3_learning_2","last_synced_at":"2026-02-06T00:33:24.150Z","repository":{"id":39140500,"uuid":"260402326","full_name":"caohuilin/d3_learning_2","owner":"caohuilin","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-05T19:49:15.000Z","size":879,"stargazers_count":0,"open_issues_count":21,"forks_count":1,"subscribers_count":0,"default_branch":"hexagon","last_synced_at":"2025-07-19T01:32:44.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/caohuilin.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":"2020-05-01T07:25:28.000Z","updated_at":"2020-07-20T13:24:18.000Z","dependencies_parsed_at":"2023-02-04T13:16:26.360Z","dependency_job_id":null,"html_url":"https://github.com/caohuilin/d3_learning_2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/caohuilin/d3_learning_2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caohuilin%2Fd3_learning_2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caohuilin%2Fd3_learning_2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caohuilin%2Fd3_learning_2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caohuilin%2Fd3_learning_2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caohuilin","download_url":"https://codeload.github.com/caohuilin/d3_learning_2/tar.gz/refs/heads/hexagon","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caohuilin%2Fd3_learning_2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29140217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T23:14:48.546Z","status":"ssl_error","status_checked_at":"2026-02-05T23:14:35.724Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-10-04T08:20:28.788Z","updated_at":"2026-02-06T00:33:24.131Z","avatar_url":"https://github.com/caohuilin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexagon Chart\n\n\u003e 使用 d3.js 实现一个使用六边形来展示数据状态的图表。\n\n该图表核心实现一个 HexagonChart 类，实现该类，并调用其`render`方法，将所需配置数据传入即可。\n\n## 使用方式\n\n废话不说，直接上代码\n\n```js\nconst hexagonChart = new HexagonChart(dom)\nhexagonChart.render(option)\n```\n\n### dom\n\n放置该图表的节点\n\n### option\n\n图表配置\n\n```json\n{\n  \"margin\": {\n    \"top\": 10,\n    \"left\": 10,\n    \"right\": 10,\n    \"bottom\": 10\n  },\n  \"series\": [\n    {\n      \"name\": \"series1\",\n      \"data\": [\n        {\n          \"name\": \"info\",\n          \"value\": 12,\n          \"color\": \"red\",\n          \"line\": [\n            {\n              \"time\": 1588486390000,\n              \"value\": 7,\n            },\n            {\n              \"time\": 1588486420000,\n              \"value\": 9,\n            },\n            {\n              \"time\": 1588486840000,\n              \"value\": 12,\n            }\n          ]\n        },\n        {\n          \"name\": \"info2\",\n          \"value\": 13,\n          \"color\": \"green\",\n          \"line\": [\n            {\n              \"time\": 1588486390000,\n              \"value\": 17,\n            },\n            {\n              \"time\": 1588486420000,\n              \"value\": 5,\n            },\n            {\n              \"time\": 1588486840000,\n              \"value\": 13,\n            }\n          ]\n        },\n        ...\n      ]\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaohuilin%2Fd3_learning_2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaohuilin%2Fd3_learning_2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaohuilin%2Fd3_learning_2/lists"}