Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There should be a single import for mp_chart instead of tens of files #147

Open
absar opened this issue Nov 6, 2020 · 0 comments
Open

Comments

@absar
Copy link
Contributor

absar commented Nov 6, 2020

First of all thanks a million for porting it to Flutter, it's a very rich library, it has a potential of becoming top Flutter charting library.
I would like to add a suggestion to create either a single export file mp_chart which should export all mp chart files, or create separate files per chart type, e.g. mp_chart_pie, mp_chart_line. Currently we have to import tons of files just to create a simple chart, which is very verbose.
For example I had to import all these files to create a simple pie chart:

import 'package:mp_chart/mp/chart/pie_chart.dart';
import 'package:mp_chart/mp/core/adapter_android_mp.dart';
import 'package:mp_chart/mp/core/animator.dart';
import 'package:mp_chart/mp/core/common_interfaces.dart';
import 'package:mp_chart/mp/core/data/pie_data.dart';
import 'package:mp_chart/mp/core/description.dart';
import 'package:mp_chart/mp/core/entry/entry.dart';
import 'package:mp_chart/mp/core/entry/pie_entry.dart';
import 'package:mp_chart/mp/core/utils/color_utils.dart';
import 'package:mp_chart/mp/core/highlight/highlight.dart';
import 'package:mp_chart/mp/core/enums/value_position.dart';
import 'package:mp_chart/mp/core/data_set/pie_data_set.dart';
import 'package:mp_chart/mp/core/enums/legend_orientation.dart';
import 'package:mp_chart/mp/core/render/pie_chart_renderer.dart';
import 'package:mp_chart/mp/controller/pie_chart_controller.dart';
import 'package:mp_chart/mp/core/enums/legend_horizontal_alignment.dart';
import 'package:mp_chart/mp/core/enums/legend_vertical_alignment.dart';
import 'package:mp_chart/mp/core/value_formatter/percent_formatter.dart';

Dart guideline for libraries:
https://dart.dev/guides/libraries/create-library-packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant