{"id":21972107,"url":"https://github.com/douglasr/ciqtools-graphing","last_synced_at":"2026-02-28T13:55:57.416Z","repository":{"id":239071975,"uuid":"715829859","full_name":"douglasr/ciqtools-graphing","owner":"douglasr","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-09T17:33:11.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-09T20:49:50.204Z","etag":null,"topics":["ciq-tools","connect-iq","connectiq","monkeyc"],"latest_commit_sha":null,"homepage":"","language":"Monkey C","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/douglasr.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":"2023-11-07T23:13:59.000Z","updated_at":"2024-05-09T20:49:52.470Z","dependencies_parsed_at":"2024-05-09T20:59:54.750Z","dependency_job_id":null,"html_url":"https://github.com/douglasr/ciqtools-graphing","commit_stats":null,"previous_names":["douglasr/ciqtools-graphing"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasr%2Fciqtools-graphing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasr%2Fciqtools-graphing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasr%2Fciqtools-graphing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasr%2Fciqtools-graphing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasr","download_url":"https://codeload.github.com/douglasr/ciqtools-graphing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227150602,"owners_count":17738312,"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":["ciq-tools","connect-iq","connectiq","monkeyc"],"created_at":"2024-11-29T15:01:43.492Z","updated_at":"2026-02-28T13:55:57.366Z","avatar_url":"https://github.com/douglasr.png","language":"Monkey C","funding_links":[],"categories":["Barrels"],"sub_categories":["Older resources"],"readme":"# CIQ Tools Graphing\n(c)2023-2024 Douglas Robertson\n\nAuthor: Douglas Robertson (GitHub: [douglasr](https://github.com/douglasr); Garmin Connect: dbrobert)\n\n## Overview\nFor the best user experience and minial friction, it is usually ideal to try and keep the interface and flow on apps similar to the native Garmin functionality. As such, the CIQ Tools Graphic barrel is a clone of the graphing functionality present within Garmin devices natively.\n\n## License\nThis Connect IQ barrel is licensed under the \"MIT License\", which essentially means that while the original author retains the copyright to the original code, you are free to do whatever you'd like with this code (or any derivative of it). See the LICENSE.txt file for complete details.\n\n## Graph Types\nThe following graph types are currently available:\n- Line Graph (generic and 7-day weekly)\n\nMore graphs will be made available as time permits. If you want/need a graph type not yet available, consider helping out. See the CONTRIBUTING.md file for details.\n\n## Using the Barrel\nThis project cannot be used on it's own; it is designed to be included in existing projects.\n\n### Include the Barrel\nDownload the barrel file (and associated debug.xml) and include it in your project.\nSee [Shareable Libraries](https://developer.garmin.com/connect-iq/core-topics/shareable-libraries/) on the Connect IQ Developer site for more details.\n\n### Displaying the Graph\nThe graphing module contains classes that extend the ```Toybox.WatchUi.Drawable``` object, which then render the actual graph. As such, you can display graphs within your app by either adding the drawable to a layout or by creating a graph drawable object and calling the ```draw()``` function on it.\n\nRegardless of the method used to render you graph, you will still need to pass the data points (and, optionally, labels for the X-axis); see below for details on that.\n\n#### Add Graph to a Layout\nTo add a graph to a layout simply include a ```\u003cdrawable\u003e``` tag:\n```\n\u003cdrawable id=\"LineGraph\" class=\"CIQToolsGraphing.Line.Generic\"\u003e\n    \u003cparam name=\"x\"\u003e40\u003c/param\u003e\n    \u003cparam name=\"y\"\u003e100\u003c/param\u003e\n    \u003cparam name=\"width\"\u003e180\u003c/param\u003e\n    \u003cparam name=\"height\"\u003e100\u003c/param\u003e\n    \u003cparam name=\"visible\"\u003etrue\u003c/param\u003e\n    \u003cparam name=\"bgColor\"\u003e0x000000\u003c/param\u003e\n    \u003cparam name=\"graphColor\"\u003e0xAAAAAA\u003c/param\u003e\n    \u003cparam name=\"pointColor\"\u003e0x00AAFF\u003c/param\u003e\n    \u003cparam name=\"textColor\"\u003e0xFFFFFF\u003c/param\u003e\n    \u003cparam name=\"textFont\"\u003eGraphics.FONT_SYSTEM_XTINY\u003c/param\u003e\n    \u003cparam name=\"lineStyle\"\u003e@CIQToolsGraphing.LINE_STYLE_DOTTED\u003c/param\u003e\n    \u003cparam name=\"border\"\u003efalse\u003c/param\u003e\n\u003c/drawable\u003e\n```\n\n#### Display the Graph Directly (via code)\n```\nvar lineGraph = new CIQToolsGraphing.Line.Generic({\n    :identifier =\u003e \"LineGraph\"\n    :locX =\u003e 40,\n    :locY =\u003e 100,\n    :width =\u003e 180,\n    :height =\u003e 100,\n    :visible =\u003e true,\n    :bgColor =\u003e 0x000000,\n    :graphColor =\u003e 0xAAAAAA,\n    :pointColor =\u003e 0x00AAFF,\n    :textColor =\u003e 0xFFFFFF,\n    :textFont =\u003e Graphics.FONT_SYSTEM_XTINY,\n    :lineStyle =\u003e CIQToolsGraphing.LINE_STYLE_DOTTED,\n    :border =\u003e false\n});\nlineGraph.draw();\n```\n\n### Adding/Updating Data for the Graph\nData for the graph must be added dynamically, by calling the ```setDataPoints()``` function on the appropriate graphic object.\n\n```\nvar dataPoints = [5,8,2,12,11,14,10];\nvar lineGraph = View.findDrawableById(\"LineGraph\") as CIQToolsGraphing.Line.Weekly;\nlineGraph.setDataPoints(dataPoints);\n```\n\n## Contributing\nPlease see the CONTRIBUTING.md file for details on how contribute.\n\n### Contributors\n* [Douglas Robertson](https://github.com/douglasr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasr%2Fciqtools-graphing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasr%2Fciqtools-graphing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasr%2Fciqtools-graphing/lists"}