{"id":26667250,"url":"https://github.com/vargalaszlo87/draw-correlation-matrix","last_synced_at":"2025-03-25T19:36:46.627Z","repository":{"id":260594141,"uuid":"881767493","full_name":"vargalaszlo87/draw-correlation-matrix","owner":"vargalaszlo87","description":"Draw correlation matrix in pure JavaScript","archived":false,"fork":false,"pushed_at":"2025-03-12T13:54:07.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T14:45:52.425Z","etag":null,"topics":["chart","correlation","correlation-chart","correlation-matrix","correlation-matrix-chart","matrix","pure-javascript"],"latest_commit_sha":null,"homepage":"","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/vargalaszlo87.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T07:21:12.000Z","updated_at":"2025-03-12T13:54:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ad54a02-838f-47d7-a284-f797115e078a","html_url":"https://github.com/vargalaszlo87/draw-correlation-matrix","commit_stats":null,"previous_names":["vargalaszlo87/draw-correlation-matrix"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargalaszlo87%2Fdraw-correlation-matrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargalaszlo87%2Fdraw-correlation-matrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargalaszlo87%2Fdraw-correlation-matrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargalaszlo87%2Fdraw-correlation-matrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vargalaszlo87","download_url":"https://codeload.github.com/vargalaszlo87/draw-correlation-matrix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245532628,"owners_count":20630959,"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","correlation","correlation-chart","correlation-matrix","correlation-matrix-chart","matrix","pure-javascript"],"created_at":"2025-03-25T19:36:46.072Z","updated_at":"2025-03-25T19:36:46.617Z","avatar_url":"https://github.com/vargalaszlo87.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# draw-correlation-matrix\n\nDraw correlation matrix in pure JavaScript. This is an easy way you can show your correlation matrix in a web app.\n\n![Képkivágás](https://github.com/user-attachments/assets/9495978c-fe0b-4e92-acc7-f4539fbd9993)\n\n## 🚀 Features\n\n**`_canvasName_`**\n- You can set the proper name of canvas for HTML tag.\n\n**`N`** \n- You can give the size of quadratic-matrix from 3 to n.\n\n**`__labelsVector__`**\n- You can give the name vector for \"legends\".\n\n**`__correlationMatrix__`**\n- Here can you push the data in 2D array for showing.\n\n## 🧱 Project structure\n\n```properties\n│\n|\n├── tests/\n│   └── draw-correlation-matrix.test.js\n|\n├── draw-correlation-matrix.js\n├── example.html\n├── package.json\n└── README.md\n```\n\n## ✨Getting started / Usage\n\n#### Clone source\n\n```\ngit clone https://github.com/vargalaszlo87/draw-correlation-matrix.git\n```\n\n#### Usage\n\nThis solution is simple, you can use it easily.\n\n1. Copy the **draw-correlation.matrix.js** to you directory where you would like use it.\n2. Add a **canvas** into your HTML (or other) code.\n3. Add **the size of quadratic-matrix**.\n4. Add the **labels** vector.\n5. Finally, add the 2D **correlation matrix** for the method.\n\n**`example.html`**\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eDraw Correlation Matrix\u003c/title\u003e\n    \u003cscript type=\"text/javascript\" src=\"draw-correlation-matrix.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003ccanvas id=\"matrixCanvas\"\u003e\u003c/canvas\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n        // add the datas\n        const corrMatrix = [\n            [1.00,-0.85,-0.78,0.68,-0.87,0.42],\n            [-0.85,1.00,0.79,-0.71,0.89,-0.43],\n            [-0.78,0.79,1.00,-0.45,0.66,-0.71],\n            [0.68,-0.71,-0.45,1.00,-0.71,0.09],\n            [-0.87,0.89,0.66,-0.71,1.00,-0.17],\n            [0.42,-0.43,-0.71,0.09,-0.17,1.00]\n        ];\n        const labels = [\"Alpha\", \"Beta\", \"Gamma\", \"Delta\", \"Epsilon\", \"Zeta\"];\n        // call the funcion\n        drawCorrelationMatrix.chart(\"matrixCanvas\", 6, labels, corrMatrix);\n    \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n\n## 👨‍⚖️ License\n\nDistributed under the [MIT](https://choosealicense.com/licenses/mit/) License. See `LICENSE.txt` for more information.\n\n\n## 📬 Contact\n\nVarga Laszlo - https://vargalaszlo.com - mail@vargalaszlo.com\n\nProject Link: https://github.com/vargalaszlo87/pid-c\n\n[![portfolio](https://img.shields.io/badge/my_portfolio-000?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](http://vargalaszlo.com)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvargalaszlo87%2Fdraw-correlation-matrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvargalaszlo87%2Fdraw-correlation-matrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvargalaszlo87%2Fdraw-correlation-matrix/lists"}