Chart Size (svg viewbox attribute)

1 Answer 287 Views
Charts
Andrey
Top achievements
Rank 1
Andrey asked on 22 Jun 2021, 12:29 PM

Hi

Do you plan to add the viewBox attribute to the svg tag to be able to scale charts?

https://css-tricks.com/scale-svg/#the-viewbox-attribute


1 Answer, 1 is accepted

Sort by
0
Nadezhda Tacheva
Telerik team
answered on 25 Jun 2021, 08:04 AM

Hello Andrey,

At this stage there are no plans on exposing the viewBox attribute. The chart can render either with SVG elements, or with a <canvas> tag depending on the chosen rendering mode. As viewbox is not applicable for <canvas> an approach for including it cannot be used to cover both rendering modes for the chart.

With that being said,  as an alternative we have considered implementing a feature for ability to zoom on particular part of the chart. We have an opened request for that feature in our public feedback portal - Zoom on particular part of the Chart. In case you find it useful for your case, you may vote for it to increase its popularity as we are managing the features priority for implementation based on the votes they have gathered in the feedback portal. You can also follow it to receive email notifications when its status changes (this is the best way to know when a feature is implemented as we announce such information in the portal).

Once this feature is available, would you consider it enough to cover your desired scenario? Is there any other functionality that you are trying to achieve?

In the meantime, you can currently manipulate the SVG viewbox attribute with some JS Interop - you can check here for some details how to achieve it.

I hope you will find the above information useful. If any further questions appear, please do not hesitate to contact us.

Thank you for choosing Telerik UI for Blazor!

Regards,
Nadezhda Tacheva
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/.

Tags
Charts
Asked by
Andrey
Top achievements
Rank 1
Answers by
Nadezhda Tacheva
Telerik team
Share this question
or