|
1 | | -# graphify |
| 1 | +# GRAPHIFY |
| 2 | +> #### A data visualization charts library, based on Apache ECharts, able to build advanced charts like WebGL 3D, GIS map, etc. |
| 3 | +> #### [See demo](https://warioddly.github.io/graphify/). |
| 4 | +> #### [See Echarts Examples](https://echarts.apache.org/examples/en/index.html) |
2 | 5 |
|
3 | | -A data visualization charts library, based on Apache ECharts, able to build advanced charts like WebGL 3D, GIS map, etc. |
| 6 | +|  |  | |
| 7 | +|:--------------------------------------------------------------------:|:--------------------------------------------------------------------:| |
| 8 | +|  |  | |
4 | 9 |
|
| 10 | +A Flutter package that serves as a bridge to [Apache ECharts](https://echarts.apache.org/) for creating interactive charts and data visualizations in your Flutter applications. |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +## Features |
| 17 | + |
| 18 | +- **Apache ECharts Integration:** Leverage the full power of Apache ECharts directly within your Flutter app. |
| 19 | +- **Flexible Configuration:** Pass chart configurations as JSON to render interactive visualizations. |
| 20 | +- **All ECharts Features:** You can find [here](https://echarts.apache.org/en/feature.html) eCharts features |
| 21 | + |
| 22 | + |
| 23 | +## Installation |
| 24 | + |
| 25 | +Add the dependency to your `pubspec.yaml` with: |
| 26 | +```bash |
| 27 | +dart pub add graphify |
| 28 | +``` |
| 29 | + |
| 30 | +Then run: |
| 31 | +```bash |
| 32 | +flutter pub get |
| 33 | +``` |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +## Quick Start |
| 38 | +### Importing the Package |
| 39 | +Import the package into your Dart file: |
| 40 | + |
| 41 | +```dart |
| 42 | +import 'package:graphify/graphify.dart'; |
| 43 | +``` |
| 44 | +### Basic Example |
| 45 | +Below is a minimal example demonstrating how to display a bar chart: |
| 46 | +```dart |
| 47 | +class BasicBarChart extends StatefulWidget { |
| 48 | + const BasicBarChart({super.key}); |
| 49 | +
|
| 50 | + @override |
| 51 | + State<BasicBarChart> createState() => _BasicBarChartState(); |
| 52 | +} |
| 53 | +
|
| 54 | +class _BasicBarChartState extends State<BasicBarChart> { |
| 55 | +
|
| 56 | + final controller = GraphifyController(); |
| 57 | +
|
| 58 | + @override |
| 59 | + Widget build(BuildContext context) { |
| 60 | + return GraphifyView( |
| 61 | + controller: controller, |
| 62 | + initialOptions: const { |
| 63 | + "xAxis": { |
| 64 | + "type": "category", |
| 65 | + "data": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] |
| 66 | + }, |
| 67 | + "yAxis": { |
| 68 | + "type": "value" |
| 69 | + }, |
| 70 | + "series": [ |
| 71 | + { |
| 72 | + "data": [120, 200, 150, 80, 70, 110, 130], |
| 73 | + "type": "bar" |
| 74 | + } |
| 75 | + ] |
| 76 | + }, |
| 77 | + ); |
| 78 | + } |
| 79 | +
|
| 80 | + @override |
| 81 | + void dispose() { |
| 82 | + controller.dispose(); |
| 83 | + super.dispose(); |
| 84 | + } |
| 85 | +
|
| 86 | +} |
| 87 | +``` |
| 88 | + |
| 89 | +## Parameters and Settings |
| 90 | +A string containing the [JSON configuration](https://echarts.apache.org/en/option.html#title) for the chart, based on the Apache ECharts documentation. |
| 91 | + |
| 92 | +## Documentation and Support |
| 93 | +Refer to the Apache ECharts Documentation for detailed configuration options and features. |
| 94 | +For source code, issue tracking, and contributions, visit the GitHub repository. |
| 95 | + |
| 96 | +## License |
| 97 | +This project is licensed under the [MIT License](https://github.com/warioddly/graphify/blob/main/LICENSE). |
| 98 | + |
| 99 | +## Contributing |
| 100 | +We welcome your contributions! |
| 101 | + |
| 102 | +1. Fork the repository and create a branch for your changes. |
| 103 | +2. Commit your changes with clear messages. |
| 104 | +3. Open a pull request describing your work. |
| 105 | + |
| 106 | +For bug reports or feature requests, please open an issue. |
| 107 | + |
| 108 | +Thank you! |
0 commit comments