{"id":20893500,"url":"https://github.com/arction/lcjs-example-0007-sharedaxis","last_synced_at":"2025-03-12T19:14:52.423Z","repository":{"id":98723583,"uuid":"200630917","full_name":"Arction/lcjs-example-0007-sharedAxis","owner":"Arction","description":"A demo application showcasing LightningChart JS Shared axis.","archived":false,"fork":false,"pushed_at":"2025-02-05T11:40:55.000Z","size":12140,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-05T12:34:32.532Z","etag":null,"topics":["axis","charting-library","demo","example","javascript","lcjs","lightningchart-js","performance","visualization","webgl","xy-chart"],"latest_commit_sha":null,"homepage":"https://www.arction.com/lightningchart-js-interactive-examples/examples/lcjs-example-0007-sharedAxis.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:06:31.000Z","updated_at":"2025-02-05T11:34:35.000Z","dependencies_parsed_at":"2024-04-05T13:29:43.882Z","dependency_job_id":"796a7f92-5382-4729-af90-334eb888eac3","html_url":"https://github.com/Arction/lcjs-example-0007-sharedAxis","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-0007-sharedAxis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0007-sharedAxis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0007-sharedAxis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arction%2Flcjs-example-0007-sharedAxis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arction","download_url":"https://codeload.github.com/Arction/lcjs-example-0007-sharedAxis/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":["axis","charting-library","demo","example","javascript","lcjs","lightningchart-js","performance","visualization","webgl","xy-chart"],"created_at":"2024-11-18T10:16:02.953Z","updated_at":"2025-03-12T19:14:52.411Z","avatar_url":"https://github.com/Arction.png","language":"JavaScript","readme":"# Shared Axis\n\n![Shared Axis](sharedAxis-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\nBest practice of data visualization within Data Analysis in different fields and industries is combining multiple series in one chart to examine and get richer insight about collected data. Moreover, it allows researchers to make conclusions about the researching phenomena out of each data set, to search patterns and relationships both within a collection and across collections\r\n\r\nThis example shows how to:\r\n\r\n-   configure the axis styling;\r\n-   create additional axes;\r\n-   assign series to explicit axes;\r\n-   styling of ChartXY zooming rectangle.\r\n\r\n## Request default axes.\r\n\r\nCartesian XY charts contains default X and Y axes by default. To request the default axes of a chart, you can simply use:\r\n\r\n```javascript\r\n// Cache reference to default X-axis for further usage.\r\nconst axisXDefault = chart.getDefaultAxisX()\r\n\r\n// Cache reference to default Y-axis for further usage.\r\nconst axisYDefault = chart.getDefaultAxisY()\r\n```\r\n\r\nDuring the creation of any XY series, you can attach series to default axes by not specifying the xAxis or yAxis options.\r\n\r\n## Create new axis and attach series.\r\n\r\n```javascript\r\n// Create additional X-axis\r\nconst axisYNew = chart.addAxisX()\r\n\r\n// Create additional Y-axis\r\nconst axisYNew = chart.addAxisY()\r\n```\r\n\r\nDuring the creation of any XY series, you can attach series to any axes via the cached references as the arguments.\r\n\r\n```javascript\r\n// Create series with explicit axes, share the same x-axis between two series.\r\nconst allSeries = [\r\n    chart.addSplineSeries({\r\n    xAxis: axisXDefault,\r\n    yAxis: AxisYDefault\r\n    }),\r\n    chart.addSplineSeries({\r\n    xAxis: axisXDefault,\r\n    yAxis: axisYNew\r\n    }),\r\n    ...\r\n]\r\n```\r\n\r\n## Axis styling.\r\n\r\nBoth X and Y axes share the same flexible and fully customizable API, meaning the same setters and getters. The full list of methods of the class **_Axis_** you can find in LightningChart JS API reference.\r\n\r\n```javascript\r\n// Add additional styling for the axis.\r\naxis\r\n    .setTitle( 'My axis' )\r\n    // Configure axis line style.\r\n    .setStrokeStyle( axisStrokeStyle )\r\n    // Configure axis tick style by modifying the Axis TickStrategy.\r\n    .setTickStrategy(\r\n        // Use Numeric TickStrategy as Base.\r\n        AxisTickStrategies.Numeric,\r\n        // Use a mutator to modify the TickStrategy.\r\n        ( tickStrategy ) =\u003e tickStrategy\r\n            // Modify the Major Ticks for the TickStrategy.\r\n            // Minor and Extreme TickStyles must be set separately.\r\n            .setMajorTickStyle( visibleTicks =\u003e visibleTicks\r\n                // Label fill Style.\r\n                .setLabelFillStyle( axisLabelFillStyle )\r\n                // Font.\r\n                .setLabelFont( font =\u003e font\r\n                    // Configure the font.\r\n                    ...\r\n                )\r\n                // Grid stroke style\r\n                .setGridStrokeStyle( gridStrokeStyle )\r\n            )\r\n    )\r\n    // Configure axis overlay style (interactive axis area).\r\n    .setOverlayStyle( axisFillStyleHighlight )\r\n```\r\n\n\n## API Links\n\n* [XY cartesian chart]\n* [Axis]\n* [Spline series]\n* [Color palettes]\n* [RGBA color factory]\n* [Solid FillStyle]\n* [Solid LineStyle]\n* [Auto cursor XY]\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[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/ChartXY.html\n[Axis]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/Axis.html\n[Spline series]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/SplineSeries.html\n[Color palettes]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/variables/ColorPalettes.html\n[RGBA color factory]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/functions/ColorRGBA.html\n[Solid FillStyle]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/SolidFill.html\n[Solid LineStyle]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/classes/SolidLine.html\n[Auto cursor XY]: https://lightningchart.com/js-charts/api-documentation/v7.0.1/interfaces/AutoCursorXY.html\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farction%2Flcjs-example-0007-sharedaxis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farction%2Flcjs-example-0007-sharedaxis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farction%2Flcjs-example-0007-sharedaxis/lists"}