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

Mapping of chart data points and actual coordinates

1 Answer 498 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 19 May 2020, 08:32 AM

hi Kendo UI team,

here is the description of my problem.

Requirement : I need to plot Trendline and Standard deviation lines on a Scatter Chart. 

Problems : 

I tried to achieve this using kendo.draw.Path to draw Trendline and SD lines

But the problem is

  1. kendo.draw.Path considers whole canvas as the plottable area with top-left corner as origin (0,0)
  2. Scatter chart has origin at left-bottom with some margin based on axis labels
  3. I could not figure out the mapping between chart coordinates & path coordinates 

Questions:

  1. How to get the boundaries of Chart Area in coordinates?
  2. How to get mapping between Charts data points and Path w.r.t. coordinates? i.e. the x,y coordinates of  the data (1023, 3250) is (150, 320)

The data for Scatter Chart varies from decimal points to 1000s (on both the axes) based on the user selection. Hence knowing the mapping between the actual coordinates and the data points only solves the problem.

 

thanks,

Srinivas

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 21 May 2020, 07:59 AM

Hello Srinivas,

 

In order to show a trend line in a Kendo Chart you can include additional series that is showing the trend. The knowledge base article below illustrates the approach:

https://docs.telerik.com/kendo-ui/knowledge-base/chart-add-trend-line

When showing scatter chart the approach will be similar:

https://dojo.telerik.com/EPUfINaQ

 

As for showing standard deviation in the Chart. For that you can use the errorBars option and set the value for it to stddev. Check out the article below that illustrates the functionality:

https://docs.telerik.com/kendo-ui/controls/charts/elements/error-bars#setting-statistical-values

 

Regards,
Viktor Tachev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Charts
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or