{"id":18036295,"url":"https://github.com/nightroman/farnet.fsharp.charting","last_synced_at":"2025-05-12T23:27:10.929Z","repository":{"id":142683453,"uuid":"271557987","full_name":"nightroman/FarNet.FSharp.Charting","owner":"nightroman","description":"FarNet friendly FSharp.Charting extension","archived":false,"fork":false,"pushed_at":"2025-01-01T09:41:08.000Z","size":99,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T03:03:34.403Z","etag":null,"topics":["charting","farmanager","farnet","fsharp"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nightroman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-06-11T13:47:51.000Z","updated_at":"2025-01-08T12:05:22.000Z","dependencies_parsed_at":"2024-01-17T06:54:59.461Z","dependency_job_id":"08726379-578b-416c-818d-e002caf23437","html_url":"https://github.com/nightroman/FarNet.FSharp.Charting","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/nightroman%2FFarNet.FSharp.Charting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightroman%2FFarNet.FSharp.Charting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightroman%2FFarNet.FSharp.Charting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightroman%2FFarNet.FSharp.Charting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nightroman","download_url":"https://codeload.github.com/nightroman/FarNet.FSharp.Charting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253839218,"owners_count":21972294,"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":["charting","farmanager","farnet","fsharp"],"created_at":"2024-10-30T12:12:23.534Z","updated_at":"2025-05-12T23:27:10.884Z","avatar_url":"https://github.com/nightroman.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[NuGet]: https://www.nuget.org/packages/FarNet.FSharp.Charting\r\n[GitHub]: https://github.com/nightroman/FarNet.FSharp.Charting\r\n[/samples]: https://github.com/nightroman/FarNet.FSharp.Charting/tree/main/samples\r\n[FSharp.Charting]: https://fslab.org/FSharp.Charting/index.html\r\n\r\n# FarNet.FSharp.Charting\r\n\r\nFarNet friendly [FSharp.Charting] extension\r\n\r\n## Package\r\n\r\nThe package is designed for [FarNet.FSharpFar](https://github.com/nightroman/FarNet/tree/main/FSharpFar).\r\nTo install FarNet packages, follow [these steps](https://github.com/nightroman/FarNet#readme).\r\n\r\nThe package is based on [FSharp.Charting].\r\n\r\n## Features\r\n\r\nIn addition to the original FSharp.Charting features:\r\n\r\n- The library may be called from MTA threads.\r\n- Loop charts, often easier than live charts.\r\n- Chart windows are modeless by default.\r\n- Chart windows provide more options.\r\n- Timer helpers for live charts.\r\n\r\n## How to use\r\n\r\nInstead of the original `Chart.Show` with a chart instance, use the new\r\nmethod `Chart.Show` with a function which creates and configures a chart.\r\n\r\nExample, instead of the original method:\r\n\r\n```fsharp\r\n\u003cdata\u003e\r\n|\u003e Chart.Line\r\n|\u003e Chart.Show\r\n```\r\n\r\nuse this new:\r\n\r\n```fsharp\r\nfun () -\u003e\r\n    \u003cdata\u003e\r\n    |\u003e Chart.Line\r\n|\u003e Chart.Show(title=\"My chart\", ...)\r\n```\r\n\r\nThe new method is slightly more verbose but it has some advantages:\r\n\r\n- It is modeless by default, the original is always modal.\r\n- It works well in Far Manager, unlike the original.\r\n- It provides handy features via parameters.\r\n- It may be called from MTA threads.\r\n\r\nThe original `Chart.Show` is still available and partially works in FarNet. It\r\nshows charts. But some features may not work, for example context menu commands\r\n\"copy to clipboard\", \"save as\", etc.\r\n\r\n## \"Loop\" and \"Live\" charts\r\n\r\nThere are two ways of showing charts with dynamic content:\r\nnew loop charts and original live charts.\r\n\r\nLoop charts are very easy, just specify the required timer interval as the\r\nparameter `loop`:\r\n\r\n```fsharp\r\nfun () -\u003e\r\n    \u003cdata\u003e\r\n    |\u003e Chart.X\r\n|\u003e Chart.Show(loop=2000)\r\n```\r\n\r\nLive charts are slightly more difficult, they require input data as special\r\nstreams of events or observables. If data do not naturally come from events\r\nthen some conversion is needed. See the original manual for the details.\r\n\r\nUnlike loop charts, live charts cannot change chart parameters dynamically.\r\n\r\nLive charts are still useful:\r\n\r\n- Live charts may be more effective because only data change on updates.\r\n- Live charts provide useful incremental charts right out of the box.\r\n- Live charts are easier to code when data come from events.\r\n\r\nIf you accidentally (!) use live charts with loop shows then the result\r\nmay be unexpected. But this is allowed and in some cases used effectively.\r\nSee [LoopLiveCharts.fsx](https://github.com/nightroman/FarNet.FSharp.Charting/blob/main/samples/LoopLiveCharts.fsx)\r\n\r\n## Timers for live charts\r\n\r\nFor generating live chart events you may use `System.Windows.Forms.Timer` or\r\nits handy helpers `Timer.map` and `Timer.mapi`. Important:\r\n\r\n- Timers and mappings must be created in chart making functions.\r\n- Do not use other timer classes like `System.Timers.Timer`.\r\n\r\n## Using with FSharpFar\r\n\r\nIn your script directory create the configuration `*.fs.ini`:\r\n\r\n```ini\r\n[use]\r\n%FARHOME%\\FarNet\\Lib\\FarNet.FSharp.Charting\\FarNet.FSharp.Charting.ini\r\n```\r\n\r\nThis is it. See [/samples].\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightroman%2Ffarnet.fsharp.charting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightroman%2Ffarnet.fsharp.charting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightroman%2Ffarnet.fsharp.charting/lists"}