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

Problem with annotation and CategoricalAxis

1 Answer 39 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 17 Jun 2019, 01:29 PM
Hi, i am creating an annotation dynamically using custom behavior (user set annotation points by clicking on scatter plot). The problem is to bound the annotation to categorical axis. I need to have annotation in any place user wants, not only in one of the CategoricalAxis values (for example in the middle of two categories). Can you help me with some ideas how can i do that?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 18 Jun 2019, 08:08 AM

Hello Andriy,

The annotations of the chart are positioned using values presented on the chart axes. This said, you cannot place an annotation between two categories, but only on the concrete category position.

A possible way to achieve your requirement is to place a Canvas panel on top of the chart and manually add Ellipse controls in the panel when necessary. You can use the Conversion API of the chart to convert between screen position and data values. Also, you can get the plot area so you can restrict where the Ellipses can be drawing using the PlotAreaClip property of the chart.

I hope this helps.

Regards, Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ChartView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or