0

I'm using achartengine to display real-time data. Does anyone know if it's possible to take an integral of the graph displayed by using some nice methods of achartengine? Or do I have to resort to my approximations with rectangles? Thanks in advance!

Nebel22
  • 478
  • 8
  • 17
  • I think you should refine the question a little bit. What does it mean "to take an integral of the graph"? – Dan D. Jul 09 '12 at 07:16
  • Dan taking a integral of a function(graph) is pretty well defined. The question would rather be, would you like a graphical representation for the integral? (This is some times done as filling the area between the x-axis and the function.) This is possible to do in achartengine, probably with rectangle approximation. I don't believe there is a "fill" function. If you want some sort of mathematical definition of the integral the answer is that achartengine is not a math library and don't have any functions for such problems. – larlin Jul 09 '12 at 09:52
  • I want a numerical value for the total area under the curve. I guess I'll have to do my own approximation, but I thought it was worth a shot to find out if achartengine has a function built-in :) Thanks! – Nebel22 Jul 10 '12 at 18:16

1 Answers1

1

No there is no way to achartengine to calculate the integral. To get a number value for the integral you would need to either do a approximation you self or if you have a well defined function use some sort of mathematical library.

Depending on what sort of data you have there are several ways to do the approximation, if you got a equidistant dataset with a reasonable resolution just summing them up will give you a simple approximation.

larlin
  • 188
  • 1
  • 10