Skip to content

dwfox/smooth-line-chart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%