Convert Figma logo to code with AI

diogobernardino logowilliamchart

Android Library to rapidly develop attractive and insightful charts in android applications.

5,089
799
5,089
32

Top Related Projects

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.

📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的现代化声明式数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.

27,507

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

Quick Overview

WilliamChart is an Android charting library that provides a simple and customizable way to create various types of charts in Android applications. It offers a clean API and smooth animations, making it easy for developers to integrate visually appealing charts into their apps.

Pros

  • Easy to use with a simple and intuitive API
  • Supports multiple chart types (line, bar, donut)
  • Smooth animations for data changes and user interactions
  • Highly customizable appearance and behavior

Cons

  • Limited chart types compared to some other charting libraries
  • Documentation could be more comprehensive
  • Not actively maintained (last update was in 2020)
  • Lacks advanced features like zooming and real-time updates

Code Examples

  1. Creating a Line Chart:
val lineSet = LineSet(labels, values)
    .setColor(Color.parseColor("#758cbb"))
    .setFill(Color.parseColor("#2d374c"))
    .setDotsColor(Color.parseColor("#758cbb"))
    .setThickness(4)
    .setDashed(floatArrayOf(10f, 10f))

lineChart.animation.duration = 1000
lineChart.animate(lineSet)
  1. Creating a Bar Chart:
val barSet = BarSet(labels, values)
    .setColor(Color.parseColor("#77c4d3"))

barChart.animation.duration = 1000
barChart.animate(barSet)
  1. Creating a Donut Chart:
val donutSet = DonutSet(values)
    .setColor(Color.parseColor("#b3b5bb"))
    .setDonutThickness(50f)

donutChart.animation.duration = 1000
donutChart.animate(donutSet)

Getting Started

  1. Add the dependency to your app's build.gradle file:
dependencies {
    implementation 'com.diogobernardino:williamchart:3.10.1'
}
  1. Add the chart view to your layout XML:
<com.db.williamchart.view.LineChartView
    android:id="@+id/lineChart"
    android:layout_width="match_parent"
    android:layout_height="200dp" />
  1. Create and animate the chart in your Activity or Fragment:
val lineChart: LineChartView = findViewById(R.id.lineChart)
val lineSet = LineSet(labels, values)
lineChart.animate(lineSet)

Competitor Comparisons

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.

Pros of MPAndroidChart

  • More comprehensive and feature-rich, offering a wider variety of chart types
  • Better performance for large datasets and complex visualizations
  • Extensive documentation and active community support

Cons of MPAndroidChart

  • Steeper learning curve due to its complexity and extensive API
  • Larger library size, which may impact app size and load times
  • More complex setup and configuration process

Code Comparison

MPAndroidChart:

val chart = findViewById<LineChart>(R.id.chart)
val entries = ArrayList<Entry>()
entries.add(Entry(1f, 10f))
entries.add(Entry(2f, 20f))
val dataSet = LineDataSet(entries, "Label")
val lineData = LineData(dataSet)
chart.data = lineData
chart.invalidate()

WilliamChart:

val chart = view.findViewById<LineChartView>(R.id.chart)
chart.gradientFillColors = intArrayOf(Color.WHITE, Color.BLACK)
chart.animation.duration = 1000
chart.animate(listOf(Point(1f, 10f), Point(2f, 20f)))

WilliamChart offers a more concise and straightforward API, making it easier to create simple charts quickly. However, MPAndroidChart provides more flexibility and customization options for complex visualizations, albeit with a more verbose syntax.

📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的现代化声明式数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.

Pros of AAChartKit

  • More comprehensive charting options, including 3D charts and advanced chart types
  • Supports both iOS and Android platforms
  • Extensive customization options for chart appearance and behavior

Cons of AAChartKit

  • Steeper learning curve due to more complex API
  • Larger library size, which may impact app performance
  • Less native feel compared to WilliamChart's Android-specific implementation

Code Comparison

WilliamChart (Android):

LineChartView lineChart = findViewById(R.id.lineChart)
lineChart.animate(lineSet)

AAChartKit (iOS):

let aaChartView = AAChartView()
aaChartView.aa_drawChartWithChartModel(aaChartModel)

Summary

AAChartKit offers a more feature-rich charting solution with cross-platform support, while WilliamChart provides a simpler, lightweight option specifically for Android. AAChartKit's extensive customization options come at the cost of increased complexity and library size. WilliamChart, on the other hand, offers a more native Android experience with a simpler API but fewer chart types and customization options. The choice between the two depends on the specific requirements of your project, such as platform support, chart complexity, and performance considerations.

27,507

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.

Pros of Charts

  • More comprehensive and feature-rich, offering a wider variety of chart types
  • Actively maintained with frequent updates and a larger community
  • Supports both iOS and macOS platforms

Cons of Charts

  • Steeper learning curve due to its extensive feature set
  • Larger library size, which may impact app size and performance
  • More complex setup and configuration process

Code Comparison

WilliamChart:

val barChart: BarChartView = findViewById(R.id.barChart)
barChart.animate(barSet)

Charts:

let barChartView = BarChartView(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
barChartView.data = BarChartData(dataSet: barDataSet)
view.addSubview(barChartView)

Summary

While Charts offers a more comprehensive charting solution with cross-platform support and a larger feature set, WilliamChart provides a simpler, lightweight alternative for Android developers. Charts may be preferred for complex projects requiring diverse chart types, while WilliamChart could be ideal for simpler Android applications with basic charting needs. The choice between the two depends on the specific requirements of the project, target platform, and desired level of customization.

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.

Pros of fl_chart

  • More comprehensive chart types, including radar, scatter, and candlestick charts
  • Highly customizable with extensive styling options
  • Active development and frequent updates

Cons of fl_chart

  • Steeper learning curve due to more complex API
  • Larger package size, which may impact app performance

Code Comparison

fl_chart:

LineChart(
  LineChartData(
    lineBarsData: [
      LineChartBarData(
        spots: [FlSpot(0, 3), FlSpot(2.6, 2), FlSpot(4.9, 5)],
        isCurved: true,
        colors: [Colors.blue],
      ),
    ],
  ),
)

williamchart:

lineChart.animate(Line(
    points = listOf(0f to 4f, 1f to 8f, 2f to 2f),
    smooth = true,
    color = Color.BLUE
))

fl_chart offers more detailed customization options but requires more code, while williamchart provides a simpler API for basic charts. fl_chart is built for Flutter, making it more suitable for cross-platform development, whereas williamchart is primarily for Android. Both libraries have their strengths, and the choice depends on the specific project requirements and target platform.

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

Pros of MaterialDrawer

  • More comprehensive UI component library, offering a full drawer implementation
  • Highly customizable with extensive theming options
  • Active development and community support

Cons of MaterialDrawer

  • Larger library size, potentially increasing app size
  • Steeper learning curve due to more complex API
  • May include unnecessary features for simple drawer implementations

Code Comparison

MaterialDrawer:

DrawerBuilder()
    .withActivity(this)
    .withToolbar(toolbar)
    .addDrawerItems(
        PrimaryDrawerItem().withName("Home"),
        SecondaryDrawerItem().withName("Settings")
    )
    .build()

WilliamChart:

val lineSet = LineSet(xData, yData)
    .setColor(Color.parseColor("#9c27b0"))
    .setSmooth(true)
    .setThickness(4f)

val chart = LineChartView(this)
chart.add(lineSet)

Summary

MaterialDrawer is a comprehensive drawer library with extensive customization options, while WilliamChart focuses on chart creation. MaterialDrawer offers a complete drawer solution but may be overkill for simple implementations. WilliamChart provides a straightforward API for creating charts but lacks the broader UI components found in MaterialDrawer. The choice between the two depends on the specific needs of your project.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

williamchart phonewatch

Kotlin Version API CodeFactor

Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications.

Note: WilliamChart v3 has been completely re-written from scratch in Kotlin and does not guarantee any API/features compatibility with previous versions. Android development has been evolving quickly, and much has changed since I first started developing williamchart (e.g patterns, testing, tools), so I decided it was time to rewrite it with all these new tools in mind. I intend to keep it as light and modular as possible.

screenshot

Gradle

// Charts
implementation 'com.diogobernardino:williamchart:3.10.1'

// Tooltips
implementation 'com.diogobernardino.williamchart:tooltip-slider:3.10.1'
implementation 'com.diogobernardino.williamchart:tooltip-points:3.10.1'

If you find this library useful and decide to use it in your projects please drop me a line @dfbernardino, I will be happy to know about it.

Usage

All charts

<com.db.williamchart.view.chart_view
  ...
  app:chart_labelsColor="color"
  app:chart_labelsSize="dimension"
  app:chart_labelsFont="font" 
/>

Line Chart

<com.db.williamchart.view.LinechartView
  ...
  app:chart_lineColor="color"
  app:chart_lineThickness="dimension"
  app:chart_smoothLine=[ "true" | "false" ]
  app:chart_pointDrawable="drawable" 
/>

Bar Chart

<com.db.williamchart.view.BarChartView|HorizontalBarChartView
  ...
  app:chart_spacing="dimension"
  app:chart_barsColor="color"
  app:chart_barsBackgroundColor="color"
  app:chart_barsRadius="dimension" 
/>

Donut Chart

<com.db.williamchart.view.DonutChartView
  ...
  app:chart_donutThickness="dimension"
  app:chart_donutBackgroundColor="color"
  app:chart_donutRoundCorners="boolean"
  app:chart_donutTotal="float"
/>

License

Copyright 2019 Diogo Bernardino

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.