How to remove padding around HeatMap chart?

1 Answer 47 Views
Charts
Federico
Top achievements
Rank 1
Federico asked on 30 Nov 2023, 11:34 AM
I have a heatmap chart where I'm showing the X axis' labels on top of the chart. In the attached screenshot, you can see that the padding below the chart is bigger than the padding on the sides, how can I remove this extra padding?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Dec 2023, 02:33 PM

Hi Federico,

The Chart may render some empty space around its elements and I am afraid there is no way to remove it.

However, the screenshot shows more empty space at the bottom of the Chart than I am able to produce on my test page. Can you compare the two Chart setups?

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Federico
Top achievements
Rank 1
commented on 05 Dec 2023, 05:59 PM

Hi Dimo,

thanks for your feedback. There is just one thing from your test page that I'm not sure I understand, regarding the X axis labels positioned above the chart

In my code, I need to explicitly set

<ChartXAxisLabels Position=ChartAxisLabelsPosition.End />

to do that, while in yours it seems to be the result of this parameter:

AxisCrossingValue="@( new object[] { 10 })"

on the Y axis, but I can't see why that is happening. Can you please explain that?

Dimo
Telerik team
commented on 05 Dec 2023, 06:03 PM | edited

Yes, see this help section - Choose Axis Position

(update: I should probably confirm that your approach is simpler, while AxisCrossingValue can be useful in more complex scenarios with multiple horizontal or vertical axes.)

Tags
Charts
Asked by
Federico
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or