In a Telerik MVC Diagram, how do I make this text have a strikethrough?
g.append(new dataviz.diagram.TextBlock({
text: dataItem.AuditText,
x: 30,
y: 30,
color: "#fff",
stroke: "solid"
}));
Thank you!
James
Hello, James,
I have now moved this thread to the Public Feedback portal and others will be able to upvote it.
As for the CSS classes support, this forum thread goes into more details.
However, if the custom look is needed and you cannot achieve it with the available Diagram API and Drawing API, you may temporarily render HTML, convert it to drawing primitives and remove it. Here is the how-to article:
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,
Thank you ,and yes, please open a feature request request on my behalf, I would appreciate that.
Is there a way to add CSS classes to diagram elements; such as, the text box, etc.?
Thank you!
Hi, James,
To add the strikethrough to the<text> SVG element, we would need to expose a separate property for the TexBlock element. I can log a feature request on your behalf if you like.
Meanwhile, I would suggest using CSS:
<style>
text[fill="#fff"]{
text-decoration:line-through;
}
</style>
If you need to strike through some text but not other, you could use one of the other properties of the text block to distinguish the one that requires text decoration. here is a runnable Dojo for your reference:
https://dojo.telerik.com/@bubblemaster/EVENeNoZ
Let me know in case you need further assistance.
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/.