{"id":20893510,"url":"https://github.com/arction/lcjs-example-0002-styledsplines","last_synced_at":"2025-03-12T19:14:59.512Z","repository":{"id":98723593,"uuid":"200630718","full_name":"Arction/lcjs-example-0002-styledSplines","owner":"Arction","description":"A demo application showcasing LightningChart JS Styled Spline chart","archived":false,"fork":false,"pushed_at":"2025-02-05T11:35:04.000Z","size":12389,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-05T12:31:12.337Z","etag":null,"topics":["demo","example","javascript","lcjs","lightningchart-js","performance","spline","spline-chart","visualization","webgl"],"latest_commit_sha":null,"homepage":"https://www.arction.com/lightningchart-js-interactive-examples/examples/lcjs-example-0002-styledSplines.html","language":"JavaScript","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/Arction.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":"2019-08-05T10:05:15.000Z","updated_at":"2025-02-05T11:34:31.000Z","dependencies_parsed_at":"2024-04-05T13:29:42.128Z","dependency_job_id":"be3e41a1-401f-4646-9d89-862c0de9468c","html_url":"https://github.com/Arction/lcjs-example-0002-styledSplines","commit_stats":null,"previous_names":[],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0002-styledSplines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0002-styledSplines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0002-styledSplines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0002-styledSplines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arction","download_url":"https://codeload.github.com/Arction/lcjs-example-0002-styledSplines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243277498,"owners_count":20265352,"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":["demo","example","javascript","lcjs","lightningchart-js","performance","spline","spline-chart","visualization","webgl"],"created_at":"2024-11-18T10:16:04.911Z","updated_at":"2025-03-12T19:14:59.503Z","avatar_url":"https://github.com/Arction.png","language":"JavaScript","readme":"# JavaScript Spline Line Chart\n\n![JavaScript Spline Line Chart](styledSplines-darkGold.png)\n\nThis demo application belongs to the set of examples for LightningChart JS, data visualization library for JavaScript.\r\n\r\nLightningChart JS is entirely GPU accelerated and performance optimized charting library for presenting massive amounts of data. It offers an easy way of creating sophisticated and interactive charts and adding them to your website or web application.\r\n\r\nThe demo can be used as an example or a seed project. Local execution requires the following steps:\r\n\r\n-   Make sure that relevant version of [Node.js](https://nodejs.org/en/download/) is installed\r\n-   Open the project folder in a terminal:\r\n\r\n          npm install              # fetches dependencies\r\n          npm start                # builds an application and starts the development server\r\n\r\n-   The application is available at _http://localhost:8080_ in your browser, webpack-dev-server provides hot reload functionality.\r\n\n\n## Description\n\nThis example shows how to draw and style spline-series.\r\n\r\nFirst create the series using chart method.\r\n\r\n```javascript\r\n// Add a spline series using default X and Y axes.\r\nconst splineSeries = chart.addSplineSeries()\r\n```\r\n\r\n## Option 1: Styling using a style object.\r\n\r\nThe first option for styling of series is to create a new object that contains the necessary information about visual settings. In the case of line-series, the object must be type of _SolidLine_ to be visible.\r\n\r\n```javascript\r\n// Create a new instance of visible solid line-style.\r\nconst strokeStyle = new SolidLine()\r\n    // Set desired fill style of the stroke.\r\n    .setFillStyle(\r\n        // SolidLine can have only SolidFill fill-style.\r\n        new SolidFill().setColor(ColorRGBA(96, 204, 232)),\r\n    )\r\n    // Set thickness of the stroke.\r\n    .setThickness(5.0)\r\n\r\n// Apply styling settings to the series.\r\nsplineSeries.setStrokeStyle(strokeStyle)\r\n```\r\n\r\n## Option 2: Styling using a mutator function.\r\n\r\nUsually, it can be even more easy to simply modify the existing _Style_ of a component, rather than constructing a new one. This is done using so-called _mutator-functions_. Here's an example:\r\n\r\n```javascript\r\n// Modify the previous Stroke style of a SplineSeries, by overriding its previous thickness.\r\nsplineSeries.setStrokeStyle((strokeStyle) =\u003e strokeStyle.setThickness(1.0))\r\n```\r\n\r\nOur coding practices include fluent, self-returning API, which allows us to easily call multiple setters in one statement.\r\n\r\n```javascript\r\nsplineSeries\r\n    .setStrokeStyle(strokeStyle)\r\n    // 'transparentFill' is a static constant\r\n    // that needs to be imported from the library in order to be used.\r\n    // It is used to draw things with transparent fill that aren't disposable\r\n    // - like the points of a PointLineSeries.\r\n    .setPointFillStyle(transparentFill)\r\n```\r\n\n\n## API Links\n\n* [Solid LineStyle]\n* [Solid FillStyle]\n* [Transparent FillStyle]\n* [RGBA color factory]\n* [XY cartesian chart]\n* [Spline series]\n* [Scroll strategies]\n* [Progressive random data generator]\n\n\n## Support\n\nIf you notice an error in the example code, please open an issue on [GitHub][0] repository of the entire example.\r\n\r\nOfficial [API documentation][1] can be found on [LightningChart][2] website.\r\n\r\nIf the docs and other materials do not solve your problem as well as implementation help is needed, ask on [StackOverflow][3] (tagged lightningchart).\r\n\r\nIf you think you found a bug in the LightningChart JavaScript library, please contact sales@lightningchart.com.\r\n\r\nDirect developer email support can be purchased through a [Support Plan][4] or by contacting sales@lightningchart.com.\r\n\r\n[0]: https://github.com/Arction/\r\n[1]: https://lightningchart.com/lightningchart-js-api-documentation/\r\n[2]: https://lightningchart.com\r\n[3]: https://stackoverflow.com/questions/tagged/lightningchart\r\n[4]: https://lightningchart.com/support-services/\r\n\n© LightningChart Ltd 2009-2022. All rights reserved.\r\n\n\n[Solid LineStyle]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/SolidLine.html\n[Solid FillStyle]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/SolidFill.html\n[Transparent FillStyle]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/variables/transparentFill.html\n[RGBA color factory]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/functions/ColorRGBA.html\n[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/ChartXY.html\n[Spline series]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/SplineSeries.html\n[Scroll strategies]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/variables/AxisScrollStrategies.html\n[Progressive random data generator]: https://arction.github.io/xydata/classes/progressiverandomgenerator.html\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farction%2Flcjs-example-0002-styledsplines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farction%2Flcjs-example-0002-styledsplines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farction%2Flcjs-example-0002-styledsplines/lists"}