{"id":18678146,"url":"https://github.com/zingchart/dwa-module","last_synced_at":"2025-11-07T09:30:33.584Z","repository":{"id":85225083,"uuid":"60644746","full_name":"zingchart/dwa-module","owner":"zingchart","description":"A ZingChart module to calculate the weighted average amongst your plots.","archived":false,"fork":false,"pushed_at":"2021-12-03T19:27:35.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-27T21:14:32.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zingchart.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":"2016-06-07T20:37:58.000Z","updated_at":"2021-12-03T19:27:38.000Z","dependencies_parsed_at":"2023-04-25T13:02:09.171Z","dependency_job_id":null,"html_url":"https://github.com/zingchart/dwa-module","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/zingchart%2Fdwa-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingchart%2Fdwa-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingchart%2Fdwa-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingchart%2Fdwa-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zingchart","download_url":"https://codeload.github.com/zingchart/dwa-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239525498,"owners_count":19653337,"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":[],"created_at":"2024-11-07T09:36:11.026Z","updated_at":"2025-11-07T09:30:33.543Z","avatar_url":"https://github.com/zingchart.png","language":"JavaScript","readme":"# ZingChart Distributed Weighted Average Module\n\nThis module calculates the distributed weighted average of your plots.\n\n![dwa example](/assets/dwa-example-graph1.png)\n\n### Usage\n1. Include the module in your page after the zingchart library\n2. Include the module reference in the zingchart.render({}) method.\n\u003cpre\u003e\u003ccode\u003ezingchart.render({\n\t\tid : 'myChart',\n\t\tdata : myConfig,\n\t\theight: 400,\n\t\twidth: '100%',\n\t\tmodules: \"dwa\" // Include the dwa module!\n});\n\u003c/code\u003e\u003c/pre\u003e\n\n### Docs\n\nThere are a couple attributes you can define in your chart configuration for the dwa module.\n\n1. dwa (object) - This object can be defined in the root of the chart configuration. Within this object you can define two properties \u003cb\u003evisibleAtFirst\u003c/b\u003e and \u003cb\u003ename\u003c/b\u003e.\n\t* visibleAtFirst (boolean) - If true this attribute will show the dwa plot when the graph loads. This is the default.\n\t* name (string) - If defined, this name will appear in the legend. The default text is \"Weighted Average\".\n    * color (string) - If defined this will set the color of your dwa plot. Otherwise it will default to the standard library color for that plot.\n\u003cpre\u003e\u003ccode\u003edwa:{\n            // 'dwa' module is loaded in the render method below.\n            visibleAtFirst:true, // Default is true\n            name: \"Distributed Weighted Average\", // Optional Name\n            color: '#000' // Optional Color\n        },\u003c/code\u003e\u003c/pre\u003e\n2. weight (Number) - If defined, it must be defined within each individual series object. The default weight is 1, in which case the weighted average is an even distribution amongst plots.\n\u003cpre\u003e\u003ccode\u003eseries : [\n        {\n            values: [35,42,67,89,25,34,67,85],\n            weight: 0.4 // optional weight\n        },\n        {\n            values: [74,71,89,34,26,73,21,56],\n            weight: 0.6 // optional weight\n        }\n   ]\n\u003c/code\u003e\u003c/pre\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingchart%2Fdwa-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzingchart%2Fdwa-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingchart%2Fdwa-module/lists"}