A simple horizontal line in line charts as maximum or threhsold

1 Answer 8 Views
Charts
Leo
Top achievements
Rank 1
Iron
Leo asked on 03 May 2024, 02:55 PM

Hi,

I am trying to evaluate the possibilities to have horizontal lines for thresholds, maximums, minimums etc.
On the net I found a somewhat old post regarding stripLines, but this does not seem to be supported anymore. I can't find something in the docs / API.

So what I found next are plotbands, but manly these seem to be more suitable for areas, not really for lines.
This leaves me with custom plotbands using the drawing API (see: https://www.telerik.com/kendo-angular-ui/components/charts/elements/plot-bands/#toc-custom-plot-bands).
But this seems a bit overkill for a simple horizontal line which from my perspective only needs very basic things like value, title and let's say some styling like color, opacity, line thickness and the likes...

So my question: Is there a simple way for horizontal lines that I am missing or is the custom plotband the way to go in this matter?

Best Regards,
FirestormHell

 

1 Answer, 1 is accepted

Sort by
1
Yanmario
Telerik team
answered on 08 May 2024, 06:39 AM

Hi FirestormHell,

Your findings are correct and rendering custom plot bands might be the way to go here. What else I can suggest is if categorical charts are used, then in theory you can render a line chart that can act like a threshold, but it won't be exactly end to end of the Chart area depending on the configuration or show information. 

Another approach that can also be considered is to use custom visuals of the series item to render such a line. The following examples demonstrate a line and arrow rendering:

https://stackblitz.com/edit/angular-gkydyq-lxy4kf?file=src%2Fapp%2Fapp.component.ts

https://stackblitz.com/edit/angular-gkydyq-bdp4ps?file=src%2Fapp%2Fapp.component.ts

I do understand that using custom visuals is a bit of an overkill, but in some scenarios, it might be needed. Our feedback portal is also open for feature requests if you have something specific in mind for our Charts. 

Regards,
Yanmario
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Charts
Asked by
Leo
Top achievements
Rank 1
Iron
Answers by
Yanmario
Telerik team
Share this question
or