TChart Simple and fast charts

Overview

TChart

API

Simple and fast charts.

Current version Beta 0.9.1

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

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...

Gleam is a simple Scheme language interpreter written in Java.

Gleam Scheme Interpreter (c) 2001-2020 Guglielmo Nigri (guglielmonigri at yahoo.it, googlielmo at gmail.com) Gleam comes with ABSOLUTELY NO WARRANTY.

Jun 6, 2022

Simple way of causing a bsod using the native api implemented into a 1.12.2 Forge mod

Simple-BSOD-Mod Simple way of causing a bsod using the native api implemented into a 1.12.2 Forge mod. Dowload It HERE To make your own you can go to

Dec 28, 2022

A simple fabric mod which allows deepslate to be instamined

InstantDeepslate An extremely simple mod that allows you to instantly mine deepslate. This works by changing the blast resistance and break time value

Jan 31, 2022

Sauron, the all seeing eye! It is a service to generate automated reports and track migrations, changes and dependency versions for backend services also report on known CVE and security issues.

Sauron, the all seeing eye! It is a service to generate automated reports and track migrations, changes and dependency versions for backend services also report on known CVE and security issues.

SAURON - VERSION AND DEPLOYMENT TRACKER DESCRIPTION Sauron, the all seeing eye! It is a service to generate automated reports and track migrations, ch

Oct 31, 2022

A calculator that performs various operations such as addition, subtraction, multiplication and division of positive and negative values

A calculator that performs various operations such as addition, subtraction, multiplication and division of positive and negative values

A calculator that performs various operations such as addition, subtraction, multiplication and division of positive and negative values The calculator also does percentages, square roots and squares

Jan 31, 2022

A Local implementation of a java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

A Local implementation of a java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

A Local implementation of java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

Feb 12, 2022

Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data.

Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data.

Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data. Tripoli facilitates visualization of temporal trends and scatter during measurement, statistically rigorous filtering of data, and calculation of statistical parameters.

Dec 15, 2022

Java Notes & Codes for better understanding and it contains all the funtions with examples and also added Cheat Sheet for Revision

Java Notes & Codes for better understanding and it contains all the funtions with examples and also added Cheat Sheet for Revision...

Nov 30, 2022

Automatically discover and tag PII data across BigQuery tables and apply column-level access controls based on confidentiality level.

Automatically discover and tag PII data across BigQuery tables and apply column-level access controls based on confidentiality level.

Automatically discover and tag PII data across BigQuery tables and apply column-level access controls based on confidentiality level.

Dec 29, 2022
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
Ultra-fast SQL-like queries on Java collections

CQEngine - Collection Query Engine CQEngine – Collection Query Engine – is a high-performance Java collection which can be searched with SQL-like quer

Niall Gallagher 1.6k Dec 30, 2022
A Fast, Secure, Ready to use, Highly customizable email verifier API

Email verification API What is this? A Fast, Secure, Ready to use, Highly customizable email verifier API. How to use Clone the project git clone http

Amir 3 Oct 4, 2022
A super simple system for easily creating messages and putting them in in a file, whilst also being able to add replacements without struggle.

A super simple system for easily creating messages and putting them in in a file, whilst also being able to add replacement values without struggle. Please remember: Give constructive feedback, not negative feedback. There are probably a million things to improve, and I am aware of that.

Solyze 2 Sep 21, 2021
⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations

⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Android UI library made by @Ramotion

Ramotion 1.9k Dec 27, 2022
Simple, server side api for drawing on maps with runtime only state and no id collisions

Simple, server side api for drawing on maps with runtime only state and no id collisions! It can be used in non-main/server threads for better performance/more fps.

null 7 Sep 2, 2022
A lightweight, simple FTP server. Pure Java, no dependencies.

MinimalFTP A lightweight, simple FTP server. Pure Java, no libraries. Features Although it's named "minimal", it supports a bunch of features: 100% Ja

Guilherme Chaguri 131 Jan 5, 2023
Simple API, Complex Emails (JavaMail smtp wrapper)

Simple Java Mail Simple Java Mail is the simplest to use lightweight mailing library for Java, while being able to send complex emails including CLI s

Benny Bottema 1k Jan 5, 2023
A simple file sharing program

FileSharing A simple file sharing program How to use Place all the files to be shared in /html/files (symbolic links work).

AK 3 May 13, 2021
A simple music player bot for Discord in Java

Delete Discord A simple music player bot for Discord in Java Usage Let's start by running the .jar

Fenix 2 Sep 30, 2021
A simple ping plugin for amazing people.

SimplisticPing Download: https://github.com/LoJoSho/SimplisticPing/releases Paper Forum Post: https://forums.papermc.io/threads/simplisticping-a-ping-

null 3 Jan 9, 2022