3

For example I have a QChart with QLineSeries with some points. Chart plots lines between these points in view, but how can I access value of Y by X at place where no points are, i.e. if I have e.g. points (0,0) and (10,10) how can I get value of Y from chart for X=5 (Y must be 5 too)?

Update:

I suppose that plot represents mathematical function, i.e. one X has exactly one Y.

Shadasviar
  • 466
  • 5
  • 15
  • let's say that it has the series with coordinates `QPointF(1, 1)`, `QPointF(5, 5)` and `QPointF (2, 3)` and `x = 4`, so if we intersect the QLineSeries with the line x = 4, 2 points will be obtained. of those 2 points is it returned or both? – eyllanesc Mar 11 '18 at 17:45
  • @eyllanesc, Ok, but if we suppose that plot represents mathematical function? – Shadasviar Mar 11 '18 at 17:54
  • Those does help [Line interpolation in Qt](https://stackoverflow.com/questions/18502611/line-interpolation-in-qt) , And, [Extract points from a path](https://stackoverflow.com/questions/11699606/extract-points-from-a-path) – Mohammad Kanan Mar 11 '18 at 18:43

0 Answers0