Skip to content

A collection of examples showcasing Canvas, Path, custom shapes, UI components, and charts in Jetpack Compose, including both from-scratch implementations and third-party chart library integration.

Notifications You must be signed in to change notification settings

Shoaibkhalid65/CustomDrawing

Repository files navigation

🎨 Jetpack Compose Custom Drawing & Charts

This repository demonstrates custom drawing in Jetpack Compose using Canvas, Path, and other graphics APIs. It also showcases how to build custom shapes, UI components, and charts (BarChart, LineChart, etc.), along with an example integration of a 3rd-party chart library

The goal of this repo is to serve as a learning resource and reference for developers exploring Jetpack Compose graphics, animations, and data visualization.


✨ Features

  • Custom Drawing with Canvas

    • Drawing lines, circles, rectangles, and arcs.
    • Working with gradients, brushes, and shaders.
    • Understanding coordinates, transformations, and scaling
  • Custom Shapes & UI Components

    • Creating reusable shapes with Shape interface.
    • Path-based custom UI elements.
    • Clipping, masks, and rounded designs.
  • Charts Implementation

    • 📊 Bar Chart – Built from scratch with Compose Canvas.
    • 📈 Line Chart – Custom implementation with animations.
    • 🔄 Interactive chart gestures (panning, scaling – if included).
    • Integration of third-party chart library (e.g., Vico/YCharts).
  • Animations

    • Animated transitions with Animatable, InfiniteTransition, and LaunchedEffect.
    • Path morphing & smooth movement of drawing elements.

🧠 Learning Outcomes

By exploring this repo, you will learn:

  • How to use Canvas API in Compose.
  • Building custom shapes & UI components.
  • Implementing charts from scratch.
  • Integrating and customizing third-party chart libraries.
  • Applying animations for smoother, more dynamic graphics.

About

A collection of examples showcasing Canvas, Path, custom shapes, UI components, and charts in Jetpack Compose, including both from-scratch implementations and third-party chart library integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages