{"id":20152544,"url":"https://github.com/fe6/sparklines","last_synced_at":"2025-08-10T08:40:36.724Z","repository":{"id":44044499,"uuid":"221439062","full_name":"fe6/sparklines","owner":"fe6","description":"迷你图","archived":false,"fork":false,"pushed_at":"2022-07-20T17:27:36.000Z","size":419,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-06T03:40:51.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fe6.github.io/sparklines/","language":"TypeScript","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/fe6.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}},"created_at":"2019-11-13T11:01:59.000Z","updated_at":"2019-11-15T10:42:27.000Z","dependencies_parsed_at":"2022-09-03T18:22:58.611Z","dependency_job_id":null,"html_url":"https://github.com/fe6/sparklines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fe6/sparklines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fe6%2Fsparklines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fe6%2Fsparklines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fe6%2Fsparklines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fe6%2Fsparklines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fe6","download_url":"https://codeload.github.com/fe6/sparklines/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fe6%2Fsparklines/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269698394,"owners_count":24461195,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-13T23:12:25.229Z","updated_at":"2025-08-10T08:40:36.683Z","avatar_url":"https://github.com/fe6.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sparklines\n\u003e 迷你图\n\n## Status: Pre-Alpha.\n\n- 公共参数\n\n| 完成度 | 描述 | 参数 | 类型 | 可选值 | 默认值 | \n| ----- | ---- | ---- | ---- | ---- | ---- |\n| \u0026#9745; | 设置宽度 | width | number | 无 | 'auto' |\n| \u0026#9745; | 设置高度 | height | number | 无 | 'auto' |\n| \u0026#9745; | 设置类型 | type | number | `line` | 'auto' |\n| \u0026#9745; | 数据可配置 | values | number[] | 无 | [] |\n| \u0026#9745; | 图表内上下左右的边距 | padding | number | 无 | 0 |\n| \u0026#9744; | 设置为true可禁用所有迷你图交互 | disableInteraction | boolean | 无 | false |\n| \u0026#9744; | 如果为true，则提供给图的y值将被裁剪为介于chartRangeMin和chartRangeMax之间-默认情况下，chartRangeMin / Max仅确保图表至少跨越了该值范围，但不对其进行限制 | chartRangeClip | boolean | 无 | false |\n| \u0026#9744; | 指定用于图表的Y值范围的最小值-默认为所提供的最小值 | chartRangeMin | number | 无 | 无 |\n| \u0026#9744; | 指定用于图表的Y值范围的最大值-默认为所提供的最大值 | chartRangeMax | number | 无 | 无 |\n\n- 折线图(`type = 'line'`)\n\n\u003cimg src=\"./img/line.jpg\" alt=\"折线图\" style=\"margin: 16px 0\" /\u003e\n\n| 完成度 | 描述 | 参数 | 类型 | 可选值 | 默认值 | \n| ----- | ---- | ---- | ---- | ---- | ---- |\n| \u0026#9745; | 线的宽度 | lineWidth | number | 无 | 1 |\n| \u0026#9745; | 线的颜色，为空的时候没有颜色，默认： 佛晓蓝7 | lineColor | string | 无 | '#096dd9' |\n| \u0026#9745; | 填充的颜色，为空的时候没有颜色，默认：佛晓蓝2 | fillColor | string | 无 | '#bae7ff' |\n| \u0026#9745; | 所有点标记的半径，以像素为单位 | spotRadius | number | 无 | 1 |\n| \u0026#9745; | 图表中每个值的默认宽度均为3像素 | defaultPixelsPerValue | number | 无 | 3 |\n| \u0026#9745; | 最终值标记的CSS颜色。设置为空字符串将其隐藏，默认： 薄暮6 | spotColor | string | 无 | '#f5222d' |\n| \u0026#9745; | 为最小值显示的标记的CSS颜色。设置为false或空字符串以将其隐藏，默认： 薄暮6 | minSpotColor | boolean | 无 | '#f5222d' |\n| \u0026#9745; | 为最大值显示的标记的CSS颜色。设置为false或空字符串以将其隐藏，默认： 薄暮6 | maxSpotColor | boolean | 无 | '#f5222d' |\n| \u0026#9744; | 指定当鼠标悬停在值上时显示在该值上的斑点的颜色。设置为空以禁用。 | highlightSpotColor | string | 无 | '#5f5' |\n| \u0026#9744; | 为鼠标悬停时通过值显示的垂直线指定颜色。设置为null以禁用。 | highlightLineColor | string | 无 | '#f22' |\n\n- 柱状图(`type = 'bar'`)\n\n\u003cimg src=\"./img/bar.jpg\" alt=\"柱状图\" style=\"margin: 16px 0\" /\u003e\n\n| 完成度 | 描述 | 参数 | 类型 | 可选值 | 默认值 | \n| ----- | ---- | ---- | ---- | ---- | ---- |\n| \u0026#9745; | 正数的颜色， 默认： 薄暮 | barColor | string | 无 | '#f5222d' |\n| \u0026#9745; | 负数的颜色， 默认：极光绿 | negBarColor | string | 无 | '#52c41a' |\n| \u0026#9745; | 0 的颜色，默认：灰色 | zeroColor | string | 无 | '#bfbfbf' |\n| \u0026#9745; | 柱子的宽度 | barWidth | number | 无 | 4 |\n| \u0026#9745; | 柱子的间距 | barSpacing | number | 无 | 1 |\n| \u0026#9745; | 是否正负数两级分开显示 | zeroAxis | boolean | 无 | true |\n\n- 饼图(`type = 'pie'`)\n\n\u003cimg src=\"./img/pie.jpg\" alt=\"饼图\" style=\"margin: 16px 0\" /\u003e\n\n| 完成度 | 描述 | 参数 | 类型 | 可选值 | 默认值 | \n| ----- | ---- | ---- | ---- | ---- | ---- |\n| \u0026#9745; | 围绕整个饼图绘制的边框宽度（以像素为单位） | borderWidth | number | 无 | 0 |\n| \u0026#9745; | 以度为单位的角度以偏移第一个切片，尝试 -90 或 90 | offset | number | 无 | 0 |\n| \u0026#9745; | 用于饼图的CSS颜色数组，默认： [日暮, 青柠, 法式洋红, 佛晓蓝, 薄暮, 金盏花, 极光绿, 极客蓝, 火山, 日出, 明青, 酱紫] | sliceColors | string[] | 无 | ['#fa8c16','#a0d911','#eb2f96','#1890ff', '#f5222d','#faad14', '#52c41a', '#2f54eb', '#fa541c','#fadb14','#13c2c2','#722ed1',] |\n| \u0026#9745; | 用于绘制饼图边框的CSS颜色 | borderColor | string | 无 | '#000' |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffe6%2Fsparklines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffe6%2Fsparklines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffe6%2Fsparklines/lists"}