{"id":17081898,"url":"https://github.com/yutiansut/vifi","last_synced_at":"2025-03-23T13:24:48.724Z","repository":{"id":105876839,"uuid":"259574789","full_name":"yutiansut/VIFI","owner":"yutiansut","description":"QUANTAXIS可视化标准协议","archived":false,"fork":false,"pushed_at":"2021-02-04T15:45:35.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T19:33:03.248Z","etag":null,"topics":["quantaxis"],"latest_commit_sha":null,"homepage":"","language":null,"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/yutiansut.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,"governance":null}},"created_at":"2020-04-28T08:18:58.000Z","updated_at":"2022-12-05T16:39:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c561edf9-3752-45a0-a640-14e65ba0e1b6","html_url":"https://github.com/yutiansut/VIFI","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/yutiansut%2FVIFI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutiansut%2FVIFI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutiansut%2FVIFI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutiansut%2FVIFI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yutiansut","download_url":"https://codeload.github.com/yutiansut/VIFI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245106245,"owners_count":20561674,"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":["quantaxis"],"created_at":"2024-10-14T12:57:40.257Z","updated_at":"2025-03-23T13:24:48.684Z","avatar_url":"https://github.com/yutiansut.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# QUANTAXIS VIFI 可视化协议\n\n## 类型\n\n- 参数说明\n\n  | 参数名称 | 参数说明 | 备注 |\n  | -------- | --------| ----- |\n  | type | 绘制类型（目前可选：dot/line/area/polygon） | 必填 |\n  | data | 数据 | 必填 |\n\n### 打点\n\n- 参数说明\n\n  | 参数名称 | 参数说明                     | 备注 |\n  | -------- | ---------------------------- | ---- |\n  | Date     | 日期                         | 必填 |\n  | Value    | 数值                         | 必填 |\n  | Symbol   | svg图标                      | 必填 |\n  | Color    | 图标颜色                     | 必填 |\n  | Baseline | 图标偏移（0 居中 1 上 2 下） | 必填 |\n\n- 数据格式\n\n  ```\n  //一个点\n  [{\n      type: 'dot',\n      data: [\n          {\n              Date: 20200220,\n              Value: 16.5,\n              Symbol: '\\ue616', // \\ue616(买) \\ue618（卖）\n              Color: 'rgb(240,0,0)',\n              Baseline: 0 // 0 居中 1 上 2 下\n          }\n      ]\n  }]\n  //多个点\n  [{\n      type: 'dot',\n      data: [\n          {\n              Date: 20200220,\n              Value: 16.5,\n              Symbol: '\\ue616', // \\ue616(买) \\ue618（卖）\n              Color: 'rgb(240,0,0)',\n              Baseline: 0 // 0 居中 1 上 2 下\n          },\n          {\n              Date: 20200318,\n              Value: 13.5,\n              Symbol: '\\ue618', // \\ue616(买) \\ue618（卖）\n              Color: 'rgb(240,240,0)',\n              Baseline: 0 // 0 居中 1 上 2 下\n          }\n      ]\n  }]\n  ```\n\n### 文字\n\n- 参数说明\n\n  | 参数名称 | 参数说明            | 备注 |\n  | -------- | ------------------- | ---- |\n  | Date     | 日期                | 必填 |\n  | Time     | 时间(分钟K线才有效) | 可选 |\n  | Value    | 数值                | 必填 |\n  | Color    | 颜色                | 必填 |\n  | Text     | 文字                | 必填 |\n  | Font     | 字体风格            | 可选 |\n  \n- 数据格式\n\n  ```javascript\n  //绘制单条文字\n  [\n      {\n          type: 'text',\n          data: [\n              { Date: 20190926, Time: 945, Value: 14.5, Text: '我来试一试', Color: 'rgb(0,255,50)' }\n          ]\n      }\n  ]\n  //绘制多条文字\n  [\n      {\n        type: 'text',\n          data: [\n              { Date: 20190926, Time: 945, Value: 14.5, Text: '我来试一试', Color: 'rgb(0,255,50)' },\n              { Date: 20190905, Time: 1425, Value: 14.15, Text: '俺也来', Font: '50px 微软雅黑' }\n          ]\n      }\n  ]\n  ```\n  \n  \n\n### 画线\n\n- 参数说明\n\n  | 参数名称 | 参数说明       | 备注 |\n  | -------- | -------------- | ---- |\n  | Color    | 颜色           | 必填 |\n  | BGColor  | 填充色         | 可选 |\n  | Point    | 点坐标数据集合 | 必填 |\n  | Date     | 日期           | 必填 |\n  | Value    | 数值           | 必填 |\n\n\n- 数据格式\n\n  ```javascript\n  //一条直线\n  {\n      type: 'line',\n      data: [\n          {\n              Color: 'rgb(255,0,0)',\n              BGColor: 'rgba(255,0,0,0.5)',\n              Point: [\n                  { Date: 20200220, Value: 16.5 },\n                  { Date: 20200318, Value: 13.5 }\n              ]\n          }\n      ]\n  },\n  // 多条直线 \n  {\n      type: 'line',\n      data: [\n          {\n              Color: 'rgb(255,0,0)', \n              BGColor: 'rgba(255,0,0,0.5)', \n              Point: [\n                  { Date: 20200220, Value: 16.5 },\n                  { Date: 20200318, Value: 13.5 }\n              ]\n          },\n          {\n              Color: 'rgb(255,0,0)',\n              BGColor: 'rgba(255,0,0,0.5)',\n            \tPoint: [\n                  { Date: 20200220, Value: 13.5 },\n                  { Date: 20200318, Value: 16.5 }\n              ]\n          }\n      ]\n  },\n  ```\n  \n  \n\n### 面积\n\n- 参数说明\n\n  | 参数名称 | 参数说明                             | 备注 |\n  | -------- | ------------------------------------ | ---- |\n  | Start    | 开始时间坐标集合                     | 必填 |\n  | End      | 开始时间坐标集合                     | 必填 |\n  | Color    | 区域颜色                             | 必填 |\n  | Date     | 开始日期/结束日期                    | 必填 |\n  | Time     | 开始时间/结束时间（仅对分钟K线有效） | 可选 |\n\n- 数据格式\n\n  ```javascript\n  //一个区域\n  [{\n      type: 'area',\n      data: [\n          {\n              Start: { Date: 20200220, Time: null },\n              End: { Date: 20200318, Time: null },\n              Color: 'rgba(250,128,144,0.5)'\n          }\n      ]\n  }]\n  //多个区域\n  [{\n      type: 'area',\n      data: [\n          {\n            Start: { Date: 20200220, Time: null },\n              End: { Date: 20200318, Time: null },\n              Color: 'rgba(250,128,144,0.5)'\n          },\n          {\n              Start: { Date: 20191206, Time: null },\n              End: { Date: 20200103, Time: null },\n              Color: 'rgba(0,255,0,0.5)'\n          }\n      ]\n  }]\n  ```\n  \n\n### 多边形\n\n- 参数说明\n\n  | 参数名称 | 参数说明       | 备注 |\n  | :------- | -------------- | ---- |\n  | Color    | 边框颜色       | 必填 |\n  | BGColor  | 填充色         | 可选 |\n  | Point    | 点坐标数据结合 | 必填 |\n  | Date     | 日期           | 必填 |\n  | Value    | 数值           | 必填 |\n\n- 注意点\n\n  **坐标要连续（例如绘制矩形：点坐标顺序是：左上点坐标——\u003e右上点坐标——\u003e右下点坐标——\u003e坐下点坐标）**\n  \n  **只要连续即可（顺时针或逆时针都行）**\n  \n- 数据格式\n\n  ```javascript\n  //绘制一个多边形\n  {\n      // 至少三个点坐标\n      type: 'polygon',\n      data: [\n          // 例如：矩型\n          {\n              Color: 'rgba(52,46,37,0)',\n              BGColor: 'rgba(255,0,0,0.5)',\n              Point: [\n                  { Date: 20200108, Value: 16.0 },\n                  { Date: 20200213, Value: 16.0 },\n                  { Date: 20200213, Value: 14.0 },\n                  { Date: 20200108, Value: 14.0 }\n              ]\n          }\n      ]\n  }\n  //绘制多个多边形\n  {\n      // 至少三个点坐标\n      type: 'polygon',\n      data: [\n          // 例如：矩型\n          {\n              Color: 'rgba(52,46,37,0)',\n              BGColor: 'rgba(255,0,0,0.5)',\n              Point: [\n                  { Date: 20200108, Value: 16.0 },\n                  { Date: 20200213, Value: 16.0 },\n                  { Date: 20200213, Value: 14.0 },\n                  { Date: 20200108, Value: 14.0 }\n              ]\n          },\n          // 例如：三角形\n          {\n              Color: 'rgb(255,0,0)',\n              BGColor: 'rgba(255,0,0,0.5)',\n              Point: [\n                  { Date: 20191022, Value: 17.26 },\n                  { Date: 20191113, Value: 15.5 },\n                  { Date: 20190925, Value: 15.5 }\n              ]\n          },\n          // 例如:五边形\n          {\n              Color: 'rgb(255,0,0)',\n              BGColor: 'rgba(0,255,0,0.5)',\n              Point: [\n                  { Date: 20190821, Value: 17.0 },\n                  { Date: 20190903, Value: 15.5 },\n                  { Date: 20190826, Value: 13.5 },\n                  { Date: 20190813, Value: 13.5 },\n                  { Date: 20190808, Value: 15.5 }\n              ]\n          }  \n      ]\n  }\n  ```\n  \n\n## 同时绘制多种类型\n\n- 数据格式\n\n  ```javascript\n  [\n      {\n          type: 'dot',\n          data: [\n              {\n                  Date: 20200220,\n                  Value: 16.5,\n                  Symbol: '\\ue616', // \\ue616(买) \\ue618（卖）\n                  Color: 'rgb(240,0,0)',\n                  Baseline: 0 // 0 居中 1 上 2 下\n              },\n              {\n                  Date: 20200318,\n                  Value: 13.5,\n                  Symbol: '\\ue618', // \\ue616(买) \\ue618（卖）\n                  Color: 'rgb(240,240,0)',\n                  Baseline: 0// 0 居中 1 上 2 下\n              }\n          ]\n      },\n      {\n          type: 'line',\n          data: [\n              {\n                  Color: 'rgb(255,0,0)', // 直线颜色\n                  BGColor: 'rgba(255,0,0,0.5)', // 一条直线这一项可不写\n                  Point: [\n                      { Date: 20200220, Value: 16.5 },\n                      { Date: 20200318, Value: 13.5 }\n                  ]\n              },\n              {\n                  Color: 'rgb(255,0,0)', // 直线颜色\n                  BGColor: 'rgba(255,0,0,0.5)', // 一条直线这一项可不写\n                  Point: [\n                      { Date: 20200220, Value: 13.5 },\n                      { Date: 20200318, Value: 16.5 }\n                  ]\n              }\n          ]\n      },\n      {\n          type: 'area',\n          data: [\n              {\n                  Start: { Date: 20200220, Time: null },\n                  End: { Date: 20200318, Time: null },\n                  Color: 'rgba(250,128,144,0.5)'\n              },\n              {\n                Start: { Date: 20191206, Time: null },\n                  End: { Date: 20200103, Time: null },\n                  Color: 'rgba(0,255,0,0.5)'\n              }\n          ]\n      },\n      {\n          // 至少三个点坐标\n          type: 'polygon',\n          data: [\n              // 例如：矩型\n              {\n                  Color: 'rgba(52,46,37,0)',\n                  BGColor: 'rgba(255,0,0,0.5)',\n                  Point: [\n                      { Date: 20200108, Value: 16.0 },\n                      { Date: 20200213, Value: 16.0 },\n                      { Date: 20200213, Value: 14.0 },\n                      { Date: 20200108, Value: 14.0 }\n                  ]\n              },\n              // 例如：三角形\n              {\n                  Color: 'rgb(255,0,0)',\n                  BGColor: 'rgba(255,0,0,0.5)',\n                  Point: [\n                      { Date: 20191022, Value: 17.26 },\n                      { Date: 20191113, Value: 15.5 },\n                      { Date: 20190925, Value: 15.5 }\n                  ]\n              },\n              // 例如:五边形\n              {\n                  Color: 'rgb(255,0,0)',\n                  BGColor: 'rgba(0,255,0,0.5)',\n                  Point: [\n                      { Date: 20190821, Value: 17.0 },\n                      { Date: 20190903, Value: 15.5 },\n                      { Date: 20190826, Value: 13.5 },\n                      { Date: 20190813, Value: 13.5 },\n                      { Date: 20190808, Value: 15.5 }\n                  ]\n              }\n          ]\n      }\n  ]\n  ```\n  \n\n## 信息地雷\n\n- 参数说明\n\n  | 参数名称    | 参数说明            | 备注 |\n  | ----------- | ------------------- | ---- |\n  | releasedate | 时间                | 必填 |\n  | title       | 信息地雷提示信息    | 必填 |\n  | typeex      | 图标（0：买/1：卖） | 必填 |\n\n- 数据格式\n\n  ```\n  {\n      type:'infoMine',\n      data:[\n          { releasedate: 20200305, title: '20200305扩展类型公告1', typeex: [0] },\n          { releasedate: 20200323, title: '20200323扩展类型公告2', typeex: [1] }\n    ]\n  }\n  ```\n  \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutiansut%2Fvifi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyutiansut%2Fvifi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutiansut%2Fvifi/lists"}