TChart - Simple and fast charts.

Related tags

Charts TCharts
Overview

TChart

API

Simple and fast charts.

Preview



Import

jitpack.io

gradle

allprojects {
  repositories {
    ....
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.makstron:TCharts:0.9'
}

maven

<repositories>
  <repository>
    <id>jitpack.ioid>
    <url>https://jitpack.iourl>
  repository>
repositories>
<dependency>
  <groupId>com.github.makstrongroupId>
  <artifactId>TChartsartifactId>
  <version>0.9.1version>
dependency>

Usage

Sample project

See app directory. Sample project is under construction. Not all features are covered yet.

Usage in code

Example for create data

values = new ArrayList(); for (int j = 0; j < keys.size(); j++) { values.add(random.nextInt(1000)); } ChartItem chartItem = new ChartItem(startTime, values); items.add(chartItem); } ChartData chartData = new ChartData(keys, names, colors, items) ">
ArrayList<String> keys = new ArrayList<String>(); //keys for each chart
ArrayList<String> names = new ArrayList<String>(); //names for chart
ArrayList<Integer> colors = new ArrayList<Integer>(); //colors for lines
ArrayList<ChartItem> items = new ArrayList<ChartItem>(); //charts value for some time
//ChartItem
// time - time point (on x line)
// values - list values for this moment of time in order from keys

keys.add("y0");
keys.add("y1");
names.add("Red Line");
names.add("Green Line");
colors.add(Color.RED);
colors.add(Color.GREEN);

long startTime = 1614542230000L;
Random random = new Random();
for (int i = 0; i < 100; i++) {
  //time moment
  startTime += 86_400_000;

  //all values for this time moment
  ArrayList<Integer> values = new ArrayList<Integer>();
  for (int j = 0; j < keys.size(); j++) {
    values.add(random.nextInt(1000));
  }

  ChartItem chartItem = new ChartItem(startTime, values);
  items.add(chartItem);
}
ChartData chartData = new ChartData(keys, names, colors, items)
val tChart = TChart(context)
val layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
tChart.layoutParams = layoutParams
tChart.id = View.generateViewId()
tChart.setData(chartData, true)
tChart.setTitle(String.format("Chart #%d", i))
layout.addView(tChart)

Usage in XML

">
<com.klim.tcharts.TChart
  android:id="@+id/tchart"
  android:layout_width="match_parent"
  android:layout_height="300dp"
  android:layout_marginTop="8dp"
  android:padding="16dp"
  app:backgroundColor="#785630"
  app:detailDivisionColor="#fff"
  app:detailLabelsFontColor="#BA1B289E"
  app:detailLineSelectedPosition="#871893"
  app:infoWindowBackground="#6338C6"
  app:infoWindowShadowColor="#980A16"
  app:infoWindowTitleColor="#117F8E"
  app:navBordersColor="#000000"
  app:navViewFillColor="#BA7C3838"
  app:showTitle="true"
  app:title="Title"
  app:titleFontColor="#339728"
  app:titleFontSize="16dp" />

Properties


Properties Default White theme Default Dark theme
backgroundColor #FFFFFF #1D2733
showTitle true true
title
titleFontSize 16sp 16sp
titleFontColor #3896D4 #7BC4FB
detailLabelsFontColor #506372 #506372
detailDivisionColor #efeff0 #151e2a
detailLineSelectedPosition #73C9D8E3 #AD0E1721
infoWindowBackground #FFFFFFFF #FF202b38
infoWindowShadowColor #5C000000 #5C000000
infoWindowTitleColor #222222 #FFFFFF
navViewFillColor #BAF5F8F9 #BD19232E
navBordersColor #477DA9CA #477DA9CA
navTapCircle #92D3E3F0 #8043515c
You might also like...
Arc Chart View (Draw Creative Statistic Arc Charts)
Arc Chart View (Draw Creative Statistic Arc Charts)

ArcChartViewDemo You can use this library to draw Arc charts and show your statistics or anything you want or maybe get some ratings from user. you ca

An easy-to-use Android charts library with animation.
An easy-to-use Android charts library with animation.

AndroidCharts A simple Android charts library. Known Uses in Pomotodo Including in Your Project Eclipse Import /AndroidCharts folder. Move /java folde

Android图表库(XCL-Charts is a free charting library for Android platform.),基于Android Canvas来绘制各种图表,使用简便,定制灵活。目前支持3D/非3D/背向式/横向/竖向柱形图(Bar Chart)、3D/非3D饼图(Pie Chart)、堆叠图(Stacked Bar Chart)、面积图(Area Chart)、 折线图(Line Chart)、曲线图(Spline Chart)、环形图(Dount Chart)、南丁格尔玫瑰图(Rose Chart)、仪表盘(Dial Chart)、刻度盘(Gauge Chart)、雷达图(Radar Chart)、漏斗图(Funnel Chart)、圆形图(Circle Chart)、弧线比较图、散点图(Scatter Chart)、气泡图(Bubble Chart)、范围条形图(RangeBar Chart)等图表。其它特性还包括支持图表缩放、手势移动、点击响应、动画效果、多轴显示、图表参考线、混合图表及同数据源不同图表类型切换等。 YBKChart is a library of 3D graphics charts for Android. 📊
YBKChart is a library of 3D graphics charts for Android. 📊

YBKChart is a library of 3D graphics charts for Android. 📊 For more information, see the Wiki. Chart List Pie Chart Download Use gradle. rep

Library for charts in android with animations
Library for charts in android with animations

Charts Gradle Setup Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories: allprojects {

Donut is an Android library which helps you to easily create beautiful doughnut-like charts.
Donut is an Android library which helps you to easily create beautiful doughnut-like charts.

Doughnut-like graph view capable of displaying multiple datasets with assignable colors

Straiberry Charts - An awesome Chart library for android
Straiberry Charts - An awesome Chart library for android

Straiberry Charts An awesome Chart library for android Straiberry · Report Bug · Request Feature Getting Started Adding dependecies Add it in your roo

Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨

RatingReviews RatingReviews (Rating and Reviews) is a widget and layout that adds a "Rating & Reviews" bar to your app, similar to the ones seen on Go

Simple Line, Circle, Bar chart for Android
Simple Line, Circle, Bar chart for Android

SimpleChart Simple Line, Circle, Bar chart for Android LineChart com.aghajari.simplechart.LineChart android:id="@+id/line_chart" android:layo

Comments
  • Usage of ArrayList in constructor makes it harder to use.

    Usage of ArrayList in constructor makes it harder to use.

    I want to choose list implementation when creating chart data. Please use just List interface rather ArrayList.

    public ChartData(ArrayList<String> keys, ArrayList<String> names, ArrayList<Integer> colors, ArrayList<ChartItem> items)

    opened by leCandas 8
  • Landscape orientation difficult

    Landscape orientation difficult

    The chart doesn't sit well in landscape orientation, possibly due to a fixed height? It will always stick out the bottom of a container or cut off the navigation view.

    opened by matty337s 4
  • Any plans for a Java example

    Any plans for a Java example

    Hi,

    Live the look of the component, and particularly that the values on the x-axis are actually Dates/Times, but I'm relatively new to Java, and have never used Kotlin, and I'd love to try it out. I suspect I can probably hack it but if you are planning to release a Java example tomorrow I'd be better off waiting.

    Thanks

    opened by KJH1964 4
Releases(0.9.4)
Owner
null
An open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use

android-compose-charts This is an open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use. Just couples

Mahmoud Ibrahim 17 Dec 31, 2022
Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop.

compose-charts Simple Jetpack Compose Charts for multi-platform. Including Android, Web, Desktop. Graph Effects How to use? 1, show Pie Chart in Jetpa

Chen Pan 112 Jan 8, 2023
Simple Compose Charts for multi-platform. Including Android, Web, Desktop.

compose-charts-desktop Simple Compose Charts for multi-platform. Including Android, Web, Desktop. Compose multiplatform for Android: compose-charts. G

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

⚡ A powerful & easy to use chart library for Android ⚡ Charts is the iOS version of this library Table of Contents Quick Start Gradle Maven Documentat

Philipp Jahoda 36k Dec 31, 2022
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Diogo Bernardino 4.9k Dec 30, 2022
Charts/graphs library for Android compatible with API 8+, several chart types with support for scaling, scrolling and animations

HelloCharts for Android Charting library for Android compatible with API 8+(Android 2.2). Works best when hardware acceleration is available, so API 1

Leszek Wach 7.4k Jan 6, 2023
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.

AnyChart for Android AnyChart Android Charts is an amazing data visualization library for easily creating interactive charts in Android apps. It runs

AnyChart 2k Jan 4, 2023
An android compose library with different Graphs and Charts

plot An android compose library with different Graphs and Charts (currently supports only Line graph, more types will be added soon) Download reposito

Madrapps 106 Dec 30, 2022
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Diogo Bernardino 4.8k Dec 22, 2021