0

i am trying to create chart like this that has a circular border
enter image description here

i want to create custom like this/ how i am gonna do that , is there any packages that i can modify it and make it like this

1 Answer 1

1

If you want to create a chart, you can use syncfusion_flutter_charts

and if you want create curves you can use CustomPaint widget. one example I find in my code for you:

CustomPaint(
   painter: CurveBackground(color: \\ yourColor),
   child: \\ your child
)


class CurveBackground extends CustomPainter {
  final Color color;

  CurveBackground({this.color});

  @override
  void paint(Canvas canvas, Size size) {
    var paint = Paint();
    paint.color = color;
    paint.style = PaintingStyle.fill;

    var path = Path();

    path.moveTo(0, Dimens.size_30());
    path.quadraticBezierTo(size.width * 0.4, size.height * 0.1,
        size.width * 0.3, size.height * 0.3);
    path.quadraticBezierTo(size.width * 0.1, size.height * 0.6,
        size.width * 0.45, size.height * 0.7);
    path.quadraticBezierTo(
        size.width * 1, size.height * 0.9, size.width * 0.9, size.height * 1.0);
    path.lineTo(size.width, size.height);
    path.lineTo(0, size.height);

    canvas.drawPath(path, paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) => true;
}

Sign up to request clarification or add additional context in comments.

6 Comments

what part of that package can i use?
you're right. I saw some numbers in your photo and thought it was a chart! I updated my post :)
well i want to create a chart
but i want to customize it like that
So why did you give me a negative score? 1. this package is open source "github.com/syncfusion/flutter-widgets" 2. your chart is something like "Spline Area"
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.