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

Rectangular as line chart markers

3 Answers 78 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Harald
Top achievements
Rank 1
Harald asked on 14 Feb 2017, 11:41 PM

Hello,

I am using line chart markers. As I see the built-in types are square,triangle and circle. I need a rectangular as marker, therefore I would need to change the height or the width of the element or draw a rectangular myself and put it as a marker. I only found an option to change the overall size of the square, which didn'tsolve my problem. 

Is there any possibility to achieve this?

 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 16 Feb 2017, 08:47 AM
Hello Harald,

You can use a custom visual to draw a rectangle - example.

Regards,
Daniel
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Harald
Top achievements
Rank 1
answered on 24 Feb 2017, 01:03 PM

Thank you for this useful code snippet,

I just have two more question regarding these markers:

1) Is there any possibility that when I use zooming, the markers also get bigger or smaller regarding the zoom factor?

2) Whenever I want to hightlight one of those markers, the shape of the highlighted element is a square instead of a rectangle. I am using exactly your code. Do you know which setting could be reponsible for this? I attached a screenshot for clarity.

 

Thank you and best regards

Harald

0
Daniel
Telerik team
answered on 28 Feb 2017, 06:36 AM
Hi again,

It is possible to scale the rectangles but you will need to manually track the zoom level. The zoom event can be used for this purpose - example.
The option that is responsible for the highlight element is highlight.visual. Please verify that it returns the correct visual.

Regards,
Daniel
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Charts
Asked by
Harald
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Harald
Top achievements
Rank 1
Share this question
or