{"id":29360265,"url":"https://github.com/bbredesen/ng-sevenseg","last_synced_at":"2026-05-16T13:31:47.257Z","repository":{"id":37597730,"uuid":"134579431","full_name":"bbredesen/ng-sevenseg","owner":"bbredesen","description":"Seven segment display built as an Angular component.","archived":false,"fork":false,"pushed_at":"2024-01-03T00:21:02.000Z","size":2810,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T07:12:26.520Z","etag":null,"topics":["angular","seven-segment-display"],"latest_commit_sha":null,"homepage":null,"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/bbredesen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-23T14:10:40.000Z","updated_at":"2023-08-15T13:06:32.000Z","dependencies_parsed_at":"2022-08-25T17:24:24.175Z","dependency_job_id":null,"html_url":"https://github.com/bbredesen/ng-sevenseg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bbredesen/ng-sevenseg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbredesen%2Fng-sevenseg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbredesen%2Fng-sevenseg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbredesen%2Fng-sevenseg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbredesen%2Fng-sevenseg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbredesen","download_url":"https://codeload.github.com/bbredesen/ng-sevenseg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbredesen%2Fng-sevenseg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33104424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","seven-segment-display"],"created_at":"2025-07-09T07:12:25.535Z","updated_at":"2026-05-16T13:31:47.238Z","avatar_url":"https://github.com/bbredesen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-sevenseg v0.1.1\n\nSeven segment display built as an Angular module and component. SVG markup shamelessly borrowed from http://brandonlwhite.github.io/sevenSeg.js/, with rendering adapted from jQuery to Angular.\n\nMIT License, see included license file.\n\n## Usage\n\n`npm i ng-sevenseg`\n\nIn the module where you want to use seven-seg:\n```\nimport { SevenSegModule } from 'ng-sevenseg';\n\n@NgModule({\n  imports: [\n    SevenSegModule\n  ]\nMyModule { ... }\n```\n\n...and in your component template:\n```\n\u003cseven-seg digits=\"3\" decimalPlaces=\"1\" value=\"2.1\"\u003e\u003c/seven-seg\u003e\n```\n\n* Minimal configuration, no attributes are required to render a blank display. You can, of course, bind to values in the controller with brackets (`[value]=\"myValue\"`)\n* Without a value set, the display will render \"off\"; an empty string will be interpreted as \"0\"\n* `digits` indicates the total number of digits displayed, including decimal places.\nIgnoring this attribute will render the display as one digit.\n* `decimalPlaces` indicates the fixed number of decimal places. Behavior is undefined\nif this value is greater than the number of digits.\n\n### Styling\n\nYou can define CSS classes to change the style of the seven segment display.\nHowever, because of the specificity in the default styling, you must define\nyour classes with the seven-seg element name, as shown below. There are three\nattribute selectors available for specific components and conditions. (Note the\nspace between the class name and the selectors.)\n\nSet values for the display as a whole:\n```\nseven-seg.myCssClass [display] {\n  background-color: #AAA;\n  fill: blue; /* Segment color */\n  height: 3em;\n}\n```\n\nSet values for segments that are turned on:\n```\nseven-seg.myCssClass [segmentOn] {\n     opacity: 1;\n}\n```\n\nSet values for segments that are turned off:\n```\nseven-seg.myCssClass [segmentOff] {\n    opacity: 0; /* Turned off segments are 20% opacity by default. */\n}\n```\n\n## TODO\n\n[X] v0.0.1: Odd bug: the following element renders as 4.5 _ instead of 4.60:\n`\u003cseven-seg value=\"4.6\" digits=\"3\" decimalPlaces=\"2\"\u003e\u003c/seven-seg\u003e\u003c/div\u003e`; other\nvalues, such as 3.6 render correctly, as does an element with only one decimal\nplace.\n\n[X] v0.1.0: Allow CSS classes to customize the display.\n\n[ ] On/off functionality\n\n[X] Calculate segment off color from segment on color (20% intensity?) Should still\nallow explicit setting of each color, so one could use (e.g.) black digits on a white background\n\n[X] CSS class name specifications for styling\n\n[ ] Decision on individual style pass-through\n\n[-] Digit slant setting/specification (user can apply transform: skewX in CSS)\n\n## History\n\n0.1.1 - Bug fix where webkit was not redrawing SVG on attribute change\n\n0.1.0 - Pass-through of CSS classes, lots of code cleanup\n\n0.0.1 - Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbredesen%2Fng-sevenseg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbredesen%2Fng-sevenseg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbredesen%2Fng-sevenseg/lists"}