{"id":21186627,"url":"https://github.com/geontech/sigplot-ts","last_synced_at":"2025-03-14T20:18:22.578Z","repository":{"id":57359466,"uuid":"106563618","full_name":"Geontech/sigplot-ts","owner":"Geontech","description":"TypeScript-based integration library for SigPlot","archived":false,"fork":false,"pushed_at":"2018-06-06T18:13:55.000Z","size":604,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-26T17:08:40.423Z","etag":null,"topics":["sigplot","typescript"],"latest_commit_sha":null,"homepage":"https://geontech.github.io/sigplot-ts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Geontech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-11T14:16:42.000Z","updated_at":"2018-06-06T18:13:57.000Z","dependencies_parsed_at":"2022-09-06T21:41:33.749Z","dependency_job_id":null,"html_url":"https://github.com/Geontech/sigplot-ts","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geontech%2Fsigplot-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geontech%2Fsigplot-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geontech%2Fsigplot-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Geontech%2Fsigplot-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Geontech","download_url":"https://codeload.github.com/Geontech/sigplot-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243639557,"owners_count":20323511,"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":["sigplot","typescript"],"created_at":"2024-11-20T18:24:53.698Z","updated_at":"2025-03-14T20:18:22.559Z","avatar_url":"https://github.com/Geontech.png","language":"TypeScript","readme":"# SigPlot TypeScript Integration Library\n\nThis library aims to simplify integration with [SigPlot][sigplot] by adding additional Typings, classes, enumerations, and interfaces to the existing basic Typings support.  The library is distributed as ES5 and ES6 modules, making it useful for developers using other languages as well.\n\nAt this time, the two plot types are Line and (Falling) Raster.  These correspond to Type 1000 and 2000 (1D and 2D, respectively).  An abstract base class (`BasePlot`) is also provided in the event your application needs other features.\n\n \u003e **Important:** At this time, this library [uses a fork][sigplot-fork] of [SigPlot][sigplot] that has basic typings support in the 2.0 development branch.\n\n## Installation\n\nInstall this library for your project using `npm`:\n\n```bash\nnpm install --save sigplot-ts\n```\n\n## Usage\n\nIn your TypeScript environment, import and utilize the plot type of interest:\n\n```typescript\nimport {\n    RasterPlot,\n    RasterPlotData,\n    FormatSize,\n    FormatType\n} from 'sigplot-ts';\n\n// Somewhere in the application\nlet plot = new RasterPlot(dom_element);\n\n// Then when data is received\nconst data: RasterPlotData = {\n    buffer: data_vector,\n    dataSize: FormatSize.Scalar,\n    dataType: FormatType.Float32\n};\n\n// Push the data\nplot.push(data);\n```\n\n \u003e **Important:** Your HTML `dom_element` must have a non-zero height set, otherwise SigPlot will not be displayed at all.  Once this is set, call `checkResize` on the plot instance to refresh the plot to the new dimensions.\n\n### Construction Options and Runtime Settings\n\nThe `sigplot.Plot` interface supports a variety of options, some of which an only be set when the plot is created.  The `ConstructorOptions` class is provided to simplify that interface.  Once the plot is instantiated, one can use the `settings` member to access the runtime subset of those options and force an update using `checkSettings`:\n\n```typescript\nplot.settings.legend = false; // hide the legend\nplot.checkSettings();\n```\n\n**X and Y Axis Labels**\n\nThe default construction options structure maps the X and Y label, via function, to the `xlab` and `ylab` members, which can be set to an enumeration (`Units`, corresponding to `sigplot.m.UNITS`).  The default function uses the enumeration to produce a string value like `Amplitude`.  The base plot class exposes these two members directly in the event one would like to update the X and Y labels at runtime:\n\n```typescript\nimport { Units } from 'sigplot-ts';\n\n// Somewhere below\nthis.plot.xlab = Units.Power; // Results in an X label of 'Power'\n```\n\nThe relationship is that the enumeration name, as a string, becomes the corresponding label text (if shown).\n\n\n## Advanced Usage\n\nIf you find that the interfaces exposed by your selected `sigplot-ts` plot do not expose the feature you want, you can access the underlying `sigplot.Plot` instance at the class's `_plot` member.  \n\nSuch usage _is discouraged_, and users interested in doing so are _encouraged_ to see [SigPlot][sigplot] for more information since those interface and configuration descriptions are not maintained in this library.\n\n\n--------\n[sigplot]: https://github.com/LGSInnovations/sigplot\n[sigplot-fork]: https://github.com/geontech/sigplot","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeontech%2Fsigplot-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeontech%2Fsigplot-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeontech%2Fsigplot-ts/lists"}