This is a migrated thread and some comments may be shown as answers.

Math Function Series

1 Answer 29 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Marcello
Top achievements
Rank 1
Marcello asked on 08 Jul 2015, 10:16 AM

Hi,

 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?     

marc.

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 13 Jul 2015, 08:09 AM
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.

Regards,
Petar Marchev
Telerik
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
Tags
ChartView
Asked by
Marcello
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or