Math Function Series

2 posts, 0 answers
  1. Marcello
    Marcello avatar
    60 posts
    Member since:
    Apr 2013

    Posted 08 Jul 2015 Link to this post


     I add in my charts series as trend lines (linear, logarithmic, polynomial,...). All work good but the best solution is show it as annotation that is not depending on a set of datapoints but that is draw on all current visible chart area (as a line annotation).

     Exists a strategy to draw a custom annotation (or other instrument) as a math function instead of a simple line?     


  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 13 Jul 2015 Link to this post

    Hello Marcello,

    If this information is somehow dependent on the horizonta/vertical axis values, this means that they are indeed data-dependent and I think it is a better choice to use a series to render this 'trend line'. Another option you have, but I wouldn't suggest you go with it, is to use the conversion api of the chart (ConvertDataToPoint method) and manually draw some polylines over the chart. These should be on top of the chart as separate UI elements and should not be part of the chart's visual tree. You will need to redraw them every time the size changes, the chart is zoomed and when the axes range change. I hope that you see that the second approach requires a bit more work, this is why I suggest you use a series for this purpose.

    Petar Marchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top