ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.63k stars 6.01k forks source link

Feature: Plot Math Functions #3642

Open jjatie opened 6 years ago

jjatie commented 6 years ago

Motivation

A common use for Charts is to plot mathematical functions. Building in the ability to plot arbitrary functions would enable a whole class of apps, and could be a valuable resource to students.

Proposed Implementation

A new chart type that takes an arbitrary function, and generates sufficient values to fill the visible area of the chart (plus a small overscan). Panning/zooming the chart should generate the additional entries and insert them at the start/end as appropriate.

liuxuan30 commented 6 years ago

not sure if we should support this. they can easily create a data set of y of the math functions from x. And do some samling. From what I remember, 200~300 dots are smooth enough