Hi, Jay,
I have now moved this thread port to the Feedback portals.
Indeed, DOM manipulation over SVG elements is not a great approach, and I would not recommend it, unless it is absolutely unavoidable. Unfortunately, there is nothing more reasonable that can be done instead.
To achieve curved text, the Kendo Drawing API needs to implement:
As for the chart events:
render - for charts with data inline the series
dataBound - for charts bound to a dataSource
Once the feature request gains enough popularity, it will be moved in the planning and added to the official functionality.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Alex. While I can create the Text and Arc, it appears they are rendered without an ID or class, which makes it rather difficult to select them in order to do DOM manipulation with them. I'd rather not rely on their placement in the rendered code, as that seems a bit brittle. Would you have any suggestions around this?
Also, is there some kind of post-render event where I could do the DOM manipulation, or where/when would you suggest this occur?
Thanks.
Hi Alex. Thanks for the references. I had actually started down that path myself, but it's good to know that's the right approach.
I think it would be nice to have this more directly available, so please do log it as a feature request.
Hi, Jay,
You can achieve a similar result as shown in the screenshot with the Kendo Donut chart by:
https://dojo.telerik.com/@bubblemaster/axIBajoz
However, to curve the label text, you will require a custom visual. On one hand, you will need the Text element and on the other, you will need t draw an Arc or a Path with the curveTo() method.
However, currently the Text and Arc would be rendered as separate elements, so the only way to connect the Arc path with the Text so it curves would be with DOM manipulation.
Here is an article that shows the expected SVG structure so that the text can be curved:
https://css-tricks.com/snippets/svg/curved-text-along-path/
Let me know in case you would like me to log this as a feature request.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.