{"id":24737936,"url":"https://github.com/jkmaina/single_value_charts","last_synced_at":"2025-03-22T18:18:03.925Z","repository":{"id":216635433,"uuid":"741856028","full_name":"jkmaina/single_value_charts","owner":"jkmaina","description":"Single Value Charts Library for Flutter","archived":false,"fork":false,"pushed_at":"2024-01-12T14:19:52.000Z","size":579,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T22:37:49.373Z","etag":null,"topics":["chart","charts","dashboard","flutter","single","summary","summary-cards","value","visualization"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/jkmaina.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-01-11T08:55:07.000Z","updated_at":"2024-12-01T12:20:46.000Z","dependencies_parsed_at":"2024-04-08T18:31:43.768Z","dependency_job_id":null,"html_url":"https://github.com/jkmaina/single_value_charts","commit_stats":null,"previous_names":["jkmaina/single_value_charts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmaina%2Fsingle_value_charts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmaina%2Fsingle_value_charts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmaina%2Fsingle_value_charts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkmaina%2Fsingle_value_charts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkmaina","download_url":"https://codeload.github.com/jkmaina/single_value_charts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244999411,"owners_count":20544873,"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":["chart","charts","dashboard","flutter","single","summary","summary-cards","value","visualization"],"created_at":"2025-01-27T22:34:44.966Z","updated_at":"2025-03-22T18:18:03.891Z","avatar_url":"https://github.com/jkmaina.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single Value Charts Library for Flutter\n\nElevate your Flutter applications with the Single Value Charts Library - a versatile and performance-optimized charting solution designed to bring clarity and insight to your data visualization needs.\n\n`single_value_charts` is a Flutter package for rendering versatile and customizable single value charts. Ideal for dashboards, analytics, and data visualization tasks. Supports a wide range of chart types like trend indicators, status charts, and more.\n\n## Features\n1. Wide Range of Chart Types: From basic numeric and textual charts to more complex comparative, trending, and status-indicative charts, our library covers a broad spectrum of visualization needs.\n2. Highly Customizable: Tailor each chart to your aesthetic preferences with extensive styling options. Customize colors, sizes, labels, and more to match your app's design language.\n3. Optimized for Performance: Built with Flutter's best practices, our charts ensure smooth rendering and efficient data handling, even with large datasets.\n4. Interactive Tooltips: Enhance user experience with interactive tooltips, providing additional context and insights into your chart data.\n5. Responsive and Adaptive: Whether it's a smartphone, tablet, or desktop, our charts are responsive and adapt seamlessly to different screen sizes.\n6. Accessibility Ready: We believe in inclusivity; our charts are designed with accessibility in mind, ensuring that your apps are usable by as many people as possible.\n7. Open Source: Dive into the code, customize, and contribute. Join our growing community of developers in enhancing this powerful charting library.\n\n### Ideal for\n1. Business Intelligence Dashboards\n2. Data Analysis Tools\n3. Financial Applications\n4. Health and Fitness Apps\n5. Environmental Monitoring Systems\n6. Any application where data visualization plays a key role!\n\n## Getting Started\nIntegrating Single Value Charts into your Flutter project is straightforward. Check out below documentation for installation instructions, examples, and customization guides.\n\n### Installation\n\nTo use `single_value_charts` in your Flutter app, add it to your dependencies:\n\n```yaml\ndependencies:\n  single_value_charts: ^1.0.0\n```\n\n### Basic Setup\n\nImport the package in your Dart code:\n\n```dart\nimport 'package:single_value_charts/single_value_charts.dart';\n```\n\n## Usage Examples\n\n### TrendIndicatorChart\n\nDisplays a trend with an indicator arrow.\n\n```dart\nTrendIndicatorChart(\n  label: 'Revenue',\n  currentValue: 20000,\n  trend: 'down',\n  trendDetails: '10% decrease since last month',\n)\n```\n\n![TrendIndicatorChart Example](https://github.com/jkmaina/single_value_charts/blob/main/example/lib/example_images/technical_indicator_chart.png)\n\n## Gallery of Chart Types\n\nHere's a preview of our gallery screen showcasing various chart types:\n\n![Gallery Screen](https://github.com/jkmaina/single_value_charts/blob/main/example/lib/example_images/example_chart_gallery.png)\n\n\n## Customizations\n\n`single_value_charts` offers extensive customization options to tailor the look and feel of the charts to match your application's design. Below are some examples of customizations you can apply:\n\n### Changing Chart Colors and Styles\n\nEach chart supports customization through `ChartThemeData`, which allows you to modify aspects like color, text style, and more.\n\n#### Example: Customizing a Trend Indicator Chart\n\n```dart\nTrendIndicatorChart(\n  label: 'User Growth',\n  currentValue: 1500,\n  trend: 'up',\n  trendDetails: '15% increase',\n  themeData: ChartThemeData(\n    backgroundColor: Colors.blueGrey[50],\n    labelStyle: TextStyle(fontSize: 18, color: Colors.blueGrey),\n    valueStyle: TextStyle(fontSize: 22, fontWeight: FontWeight.bold, color: Colors.green),\n  ),\n)\n```\n\nThis example demonstrates how to change the background color, label, and value styles of a `TrendIndicatorChart`.\n\n### Customizing Chart Interactions\n\nYou can also customize the interactive elements of the charts, like tooltips and touch responses.\n\n#### Example: Enabling Tooltips on a Change Indicator Chart\n\n```dart\nChangeIndicatorChart(\n  label: 'Quarterly Sales',\n  value: 25000,\n  change: 3000,\n  unit: 'USD',\n  enableTooltip: true, // Enable tooltip on touch\n  tooltipSettings: TooltipSettings(\n    tooltipColor: Colors.black,\n    textStyle: TextStyle(color: Colors.white),\n  ),\n)\n```\n\nThis example shows how to enable tooltips on a `ChangeIndicatorChart` and customize the tooltip appearance.\n\n### Responsiveness and Layout\n\nOur charts are designed to be responsive, adapting to different screen sizes and orientations.\n\n#### Example: Setting Minimum and Maximum Sizes\n\n```dart\nConstrainedBox(\n  constraints: BoxConstraints(\n    minWidth: 200,\n    maxWidth: 400,\n    minHeight: 100,\n    maxHeight: 200,\n  ),\n  child: TrendIndicatorChart(\n    // Chart configuration\n  ),\n)\n```\n\nBy wrapping the chart in a `ConstrainedBox`, you can define the minimum and maximum size of the chart, ensuring it adapts well to different screen sizes.\n\n\n## Interactivity\n\n### Tooltips\n\nOur chart library supports interactive tooltips, enhancing the user experience by providing additional information on user interaction.\n\n#### Enabling Tooltips\n\nTo enable tooltips on a chart, you need to set the `enableTooltip` flag to `true` when creating a chart instance. Here's an example:\n\n```dart\nvar myChart = ComparativeMetricChart(\n  label: 'Sales Comparison',\n  primaryValue: 12000,\n  secondaryValue: 9500,\n  primaryLabel: 'This Year',\n  secondaryLabel: 'Last Year',\n  enableTooltip: true, // Enable tooltips\n);\n```\n\n#### Customizing Tooltips\n\nYou can customize the appearance of tooltips using `TooltipSettings`. This includes settings for background color, text style, and more.\n\nExample:\n\n```dart\nvar myChart = ComparativeMetricChart(\n  // ... other parameters ...\n  enableTooltip: true,\n  tooltipSettings: TooltipSettings(\n    backgroundColor: Colors.blue,\n    textStyle: TextStyle(color: Colors.white),\n  ),\n);\n```\n### Interactive Demos\n\nIn the `InteractiveChartsDemo` class, we demonstrate how to implement interactive charts with tooltips. This includes handling user tap events to show and hide tooltips appropriately.\n\n```dart\nclass InteractiveChartsDemo extends StatefulWidget {\n  // ... StatefulWidget implementation ...\n}\n\nclass _InteractiveChartsDemoState extends State\u003cInteractiveChartsDemo\u003e {\n  // ... State implementation including _showTooltip and _hideTooltip methods ...\n}\n```\n\nEnsure to check out the full implementation in our example directory for more details on interactive chart features.\n\n## Platform Support\n\nSingle Value Charts Library is designed to be versatile and adaptable, supporting a wide range of platforms:\n\n- [x] iOS\n- [x] Android\n- [x] Web\n- [x] Windows\n- [x] macOS\n- [x] Linux\n\nThis cross-platform compatibility ensures that you can seamlessly integrate our charts into your Flutter applications, regardless of the target platform.\n\n\n## Troubleshooting\n\nCommon issues and their solutions.\n\n1. Charts Not Rendering Properly\nDescription: Sometimes charts might not render as expected.\nSolution: Ensure all required parameters are correctly set. If using custom data models, verify their integrity. Also, check if the parent widget constrains the chart size too much.\n\n2. Performance Issues\nDescription: Charts lagging or causing the app to run slowly.\nSolution: Optimize data size and aggregation. Avoid unnecessary state updates. Use RepaintBoundary for static charts.\n3. Tooltip Not Displaying\n\nDescription: Tooltips are not showing when they are supposed to.\nSolution: Check if enableTooltip is set to true. Ensure that the tooltip settings are correctly configured. Verify that gesture detection for tooltips is implemented correctly.\n\n4. Customization Not Applied\nDescription: Custom styles or settings not reflected in charts.\nSolution: Confirm that the customization parameters are passed correctly to the chart. If using themes, ensure they are correctly scoped in your app.\n\n### Reporting Issues\nIf you encounter an issue that's not listed here, or the suggested solutions don't work, please report it on our GitHub Issues page. When reporting an issue, please include:\n\n- A clear and descriptive title\n- Detailed steps to reproduce the problem\n- Flutter version and chart library version\n- Code snippets or a link to a minimal project where the issue is reproducible\n- Any relevant logs or error messages\n\n## Contribution Guidelines\n\nHow to contribute to the package, coding standards, and guidelines for pull requests and issue reporting.\n\nWe welcome and appreciate contributions from the community! Whether it's fixing bugs, improving documentation, or suggesting new features, your help is valuable. Here's how you can contribute:\n\n### Getting Started\nFork the Repository: Start by forking the repository to your own GitHub account.\nClone the Forked Repository: Clone the repository to your local machine to start working on your changes.\n### Making Contributions\nChoose an Issue: Look for open issues that you are interested in solving. Feel free to ask questions or propose new issues if you have ideas.\nCreate a Branch: Create a new branch in your fork for your contribution. Naming it relevantly (e.g., fix/memory-leak, feature/add-new-chart-type) helps identify its purpose.\nImplement Your Changes: Work on the changes in your branch. Make sure you adhere to the coding standards and guidelines of the project.\nWrite or Update Tests: Ensure that your changes are properly tested. Update existing tests or write new ones as necessary.\nDocument Your Changes: Update the README or documentation to reflect any changes, especially if adding features or making changes that affect users.\n### Submitting a Pull Request\nCommit Your Changes: Commit your changes with a clear and descriptive commit message.\nPush to Your Fork: Push the changes to your forked repository.\nCreate a Pull Request: Open a pull request to the main repository. Provide a clear description of the changes and reference any related issues.\nCode Review: Once you've submitted a pull request, maintainers will review your changes. Be open to feedback and make any necessary adjustments.\nMerging: If your changes are approved, a maintainer will merge them into the main repository.\n### Guidelines\nCode Style: Follow the coding style and conventions used in the project.\nQuality: Ensure your code is clean, well-organized, and efficient.\nTesting: Strive to maintain and improve the test coverage of the project.\nRespect and Collaboration: Treat all contributors with respect and collaborate openly.\n### Questions and Discussions\nIf you have questions or want to discuss ideas before contributing, feel free to open a discussion in the repository's \"Issues\" section.\n\n## License\n\n`single_value_charts` is released under the MIT License.\n\n```markdown\nMIT License\n\nCopyright (c) [2024] [Zavora Technologies Ltd]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkmaina%2Fsingle_value_charts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkmaina%2Fsingle_value_charts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkmaina%2Fsingle_value_charts/lists"}