Getting/setting the height of the plot area on a chart

1 Answer 261 Views
Charts
Nada
Top achievements
Rank 1
Nada asked on 22 Nov 2022, 08:58 AM

Hi , I'd like to know if there's a way to set the height of the plot area and if not is there a way to get the height of the plot area on the chart. I need the height of the plot area but am unsure how to get it. 

I've looked at https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/plotarea and haven't found how to get or set the plot area height.

ryty
Top achievements
Rank 1
commented on 25 Nov 2022, 12:15 AM

Me too! I need to know the height of the plot area, but I'm not sure how.

basket random
Julius
Top achievements
Rank 1
commented on 10 Jul 2023, 04:36 AM

Woow, I think the same

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 25 Nov 2022, 07:42 AM

Hi Nada and Ryty,

The plot area does not provide options for controlling its width/height, because they are automatically calculated based on the content. In certain cases, the padding/margin settings can be used for changing this:

However, you can control the width/height of the chartArea which will be the same as the width/height of the plotArea:

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/chartarea#chartareaheight

https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/chartarea#chartareawidth

Dojo demo; https://dojo.telerik.com/OGuPOKAT

I hope this helps!

Regards,
Nikolay
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
Nada
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or