{"id":16370191,"url":"https://github.com/mrdcvlsc/jcharts","last_synced_at":"2026-05-02T05:41:56.020Z","repository":{"id":127180608,"uuid":"337947124","full_name":"mrdcvlsc/jcharts","owner":"mrdcvlsc","description":"a simple graph-charts library for java swing GUI, provides pie graph and line graph","archived":false,"fork":false,"pushed_at":"2025-06-04T11:57:51.000Z","size":119,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T07:37:27.768Z","etag":null,"topics":["chart","graphics","gui","java","javafx","jframe","library","line-graph","netbeans","pie-chart","statistics","swing-gui","visualization"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mrdcvlsc.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":"2021-02-11T06:22:35.000Z","updated_at":"2025-06-04T11:57:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cb71f02-6821-4421-8c44-7aef79c4437a","html_url":"https://github.com/mrdcvlsc/jcharts","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"10556d1343a2407f77095ca0cbf49c50c096ad16"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrdcvlsc/jcharts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdcvlsc%2Fjcharts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdcvlsc%2Fjcharts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdcvlsc%2Fjcharts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdcvlsc%2Fjcharts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdcvlsc","download_url":"https://codeload.github.com/mrdcvlsc/jcharts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdcvlsc%2Fjcharts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32524565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chart","graphics","gui","java","javafx","jframe","library","line-graph","netbeans","pie-chart","statistics","swing-gui","visualization"],"created_at":"2024-10-11T03:04:15.953Z","updated_at":"2026-05-02T05:41:56.006Z","avatar_url":"https://github.com/mrdcvlsc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jcharts\na simple graph-charts library for java swing GUI, provides pie graph and line graph\n\n# Pie Graph - Sample Program\n\n```java\nimport java.util.*;\nimport javax.swing.*;\nimport jcharts.*;\n\npublic class PieSample{\n\tpublic static void main(String[] args){\n\t\tint width = 400;\n        int height = 600;\t\n\n    \t// create your pie\n        JpieCharts pie = new JpieCharts(\n            new int[]{width,height},\n            new String[]{\"intel\",\"amd\",\"nvidia\",\"arm\",\"risc\",\"cisc\"}, // labels\n            new int[]{180,90,90,23,10,30} // data\n        );\n\n        // a JPanel container\n        JPanel p = new JPanel();\n        p.setSize(width,height);\n\n        // add the pie chart to the container JPanel\n        p.add(pie);\n\n        JFrame f = new JFrame();\n        f.add(p);\n        f.pack();\n        f.setSize(width,height);\n        f.setVisible(true);\n        f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\n        // you can also add the chart directly to frame if you want\n\t}\n}\n\n```\n## resulting output\n![pie graph](img/PieSample.png)\n\n------------------------------------------------------------------------------------------------------\n\n# Line Graph - Sample Program\n\n```java\nimport java.util.*;\nimport javax.swing.*;\nimport jcharts.*;\n\npublic class LineSample{\n\tpublic static void main(String[] args){\n\n\t\tint graphWidth = 500;\n\t\tint graphHeight = 350;\n\n\t\tint widthForYLabels = 40;\n\t\tint heightForXLabels = 40;\n\n\t\tint widthForItemLabel = 100;\n        \n\t\t// create your line graph\n        JtimeSeries p = new JtimeSeries(\n            new int[]{graphWidth,graphHeight}, // size of chart\n            new int[]{widthForYLabels, heightForXLabels, widthForItemLabel},\n            new String[]{\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"}, // X Labels Array\n            new String[]{\"Burger\",\"Fried Chicken\",\"Fries\"},  // Y Labels Array\n            new int[][] // Data is a 2d array\n            { \t\t\t\n                {67,10,20,30,50,80,130},\n                {23,100,75,200,50,180,90},\n                {20,40,60,80,100,120,140}\n                /*NOTE\n            \t\tthe length of the inner arrays should match the lenght of the \"X Label Array\"\n            \t\tthe length of the outer array should match the length of the \"Y Label Array\"\n            \t*/\n            }\n        );\n\n        // adding panel to another panel\n        JPanel container = new JPanel();\n        container.setSize(750,480);\n        container.add(p);\n\n        // adding the parent panel to the main frame\n        JFrame f = new JFrame();\n        f.add(container);\n        f.pack();\n        f.setSize(750,480);\n        f.setVisible(true);\n        f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t}\n}\n```\n## reuslting output\n![line graph](img/LineSample.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdcvlsc%2Fjcharts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdcvlsc%2Fjcharts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdcvlsc%2Fjcharts/lists"}