{"id":16456103,"url":"https://github.com/amitjoy/spider-chart-swt","last_synced_at":"2025-07-04T08:33:35.751Z","repository":{"id":57716813,"uuid":"51010259","full_name":"amitjoy/Spider-Chart-SWT","owner":"amitjoy","description":"Easy to use library for generating Spider Charts using SWT","archived":false,"fork":false,"pushed_at":"2020-10-31T18:14:45.000Z","size":365,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-09T18:06:40.240Z","etag":null,"topics":["osgi","spider-chart-swt","spider-diagram","swt"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitjoy.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}},"created_at":"2016-02-03T15:48:21.000Z","updated_at":"2021-09-19T02:32:53.000Z","dependencies_parsed_at":"2022-09-26T21:40:20.596Z","dependency_job_id":null,"html_url":"https://github.com/amitjoy/Spider-Chart-SWT","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2FSpider-Chart-SWT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2FSpider-Chart-SWT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2FSpider-Chart-SWT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoy%2FSpider-Chart-SWT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitjoy","download_url":"https://codeload.github.com/amitjoy/Spider-Chart-SWT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240947648,"owners_count":19883029,"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":["osgi","spider-chart-swt","spider-diagram","swt"],"created_at":"2024-10-11T10:24:47.456Z","updated_at":"2025-02-26T22:42:27.923Z","avatar_url":"https://github.com/amitjoy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spider Chart SWT\n\n[![Build Status](https://travis-ci.org/amitjoy/Spider-Chart-SWT.svg?branch=master)](https://travis-ci.org/amitjoy/Spider-Chart-SWT)\n\nSWT utility library to generate Spider Chart Diagrams. The library uses all new Java 8 fluent API to generate Spider Diagram.\n\n### How To\n\n*In OSGi Environment (Eclipse RCP):*\n\nBuild the library using maven. You will get an OSGi bundle. You just have to install it in your Equinox runtime by just adding it to your RCP target platform.\n\n*In Java SE:*\n\nBuild the library using maven and put the recently built jar file to your application classpath.\n\n### Sample Usage\n\nCheck out the sample application in the project for the detailed information.\n\n``` java\n@SpiderChartPlot(name = \"iPhone 6\", areaColor = DARKORCHID)\npublic final class IPhone {\n\n\t@DataPoints\n\tpublic double[] dataPoints() {\n\t\tfinal double[] data = { 4, 3.5, 4, 4.6, 5 };\n\t\treturn data;\n\t}\n\n}\n```\n\n``` java\n@SpiderChartPlot(name = \"Nexus 6\", areaColor = OLIVE)\npublic final class Nexus {\n\n\t@DataPoints\n\tpublic double[] dataPoints() {\n\t\tfinal double[] data = { 4, 3, 3, 4.1, 3 };\n\t\treturn data;\n\t}\n\n}\n```\n\n``` java\npublic final class Sample {\n\n\tenum Brand {\n\t\tCOMMUNAL, INTERNATIONAL, LOCAL, OUT_OF_MARKET, STANDARD\n\t}\n\n\tprivate static SpiderChartViewer viewer;\n\n\tprivate static void buildSpiderChart(final Shell shell) {\n\t\tfinal Supplier\u003cObject\u003e iPhoneData = IPhone::new;\n\t\tfinal Supplier\u003cObject\u003e nexusData = Nexus::new;\n\n\t\tviewer = SpiderChartBuilder.config(shell, settings -\u003e {\n\t\t\tsettings.title(title -\u003e title.setText(\"Smartphone Comparison Scale\")).legend(legend -\u003e {\n\t\t\t\tlegend.addItem(iPhoneData);\n\t\t\t\tlegend.addItem(nexusData);\n\t\t\t}).plotter(plotter -\u003e {\n\t\t\t\tfinal AxesConfigurer configuration = new AxesConfigurer.Builder().addAxis(\"Battery\", 5, 0)\n\t\t\t\t\t\t.addAxis(\"Camera\", 5, 0).addAxis(\"Display\", 5, 0).addAxis(\"Memory\", 5, 0).addAxis(\"Brand\", 5, 0)\n\t\t\t\t\t\t.build();\n\t\t\t\tplotter.use(configuration);\n\t\t\t});\n\t\t}).viewer(chart -\u003e {\n\t\t\tchart.data(firstData -\u003e firstData.inject(iPhoneData)).data(secondData -\u003e secondData.inject(nexusData));\n\t\t});\n\n\t\t// Updating the chart with new parameters\n\t\tDisplay.getDefault().asyncExec(() -\u003e {\n\t\t\t// changing values in runtime\n\t\t\tfinal LineDataSeq iPhoneDataSequence = LineDataSeq.of(iPhoneData.get(), 2.0, 4.2, 4.1, 42.8, 3.7,\n\t\t\t\t\tBrand.INTERNATIONAL);\n\t\t\t// Set the first sequence\n\t\t\tviewer.getChart().getSpiderPlotter().setSeq(0, iPhoneDataSequence);\n\n\t\t\t// changing axes in runtime\n\t\t\tfinal AxesConfigurer configuration = new AxesConfigurer.Builder().addAxis(\"Battery\", 5, 0)\n\t\t\t\t\t.addAxis(\"Screen\", 5, 0).addAxis(\"Display\", 5, 0).addAxis(\"Memory\", 50, 0).addAxis(\"Sound\", 5, 0)\n\t\t\t\t\t.addAxis(\"Brand\", Brand.class).build();\n\n\t\t\tfinal LineDataSeq nexusDataSequence = LineDataSeq.of(nexusData.get(), 2.4, 3.2, 2.1, 23.8, 1.7,\n\t\t\t\t\tBrand.LOCAL);\n\n\t\t\t// Set the second sequence\n\t\t\tviewer.getChart().getSpiderPlotter().setSeq(1, nexusDataSequence);\n\t\t\tviewer.getChart().getSpiderPlotter().use(configuration);\n\t\t\tviewer.getChart().getSpiderPlotter().setMarkScalesOnEveryAxis(true);\n\t\t});\n\t}\n\n\tpublic static void main(final String[] args) {\n\t\tfinal Display display = new Display();\n\t\tfinal Shell shell = new Shell(display, SWT.DIALOG_TRIM);\n\t\tshell.setSize(800, 750);\n\n\t\tbuildSpiderChart(shell);\n\t\tshell.open();\n\n\t\twhile (!shell.isDisposed()) {\n\t\t\tif (!display.readAndDispatch()) {\n\t\t\t\tdisplay.sleep();\n\t\t\t}\n\t\t}\n\n\t\tviewer.getChart().stopWorker();\n\t\tviewer.getChart().dispose();\n\n\t\tdisplay.dispose();\n\t}\n\n}\n```\n\n### Maven Central\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.amitinside\u003c/groupId\u003e\n    \u003cartifactId\u003ecom.amitinside.tooling.chart.spider\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitjoy%2Fspider-chart-swt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitjoy%2Fspider-chart-swt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitjoy%2Fspider-chart-swt/lists"}