Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Smooth Line Chart sample custom view for Android

Notifications You must be signed in to change notification settings

PaoloConte/smooth-line-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smooth Line Chart

SmoothLineChart

This is a sample custom view for Android that shows how to draw smooth line charts.

How it works

The draw() function uses cubic splines to make the lines smoother.
Control points are calculated such that the tangent line in each point is parallel to the virtual line that joins the previous and the next point.
Furthermore, the distance between a control point and its related point is proportional to the distance between the point and the adjacent point (the next or previous one depending on the position of the control point).

SmoothLineChart

Equally spaced points

It is also provided a simpler version of the custom view for equally spaced points

About

Smooth Line Chart sample custom view for Android

Topics

Resources

Stars

Watchers

Forks

Languages