This is a migrated thread and some comments may be shown as answers.

Chart Legend Overlapping

2 Answers 420 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Angelo
Top achievements
Rank 1
Angelo asked on 03 Jan 2018, 08:46 PM

I combined a grid and a chart on an html page and tried to export to PDF.  When I try to export, the legend overlaps. Here's the plunker: https://plnkr.co/edit/Dpg3ZbTBPMuiKi0BFPBP?p=preview

 

 

2 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 04 Jan 2018, 07:33 AM
Hi Angelo,

Thank you for the runnable example. The font, used for the exported PDF document is "DejaVu Sans" while the font, used in the web page is different. The font sizes thus differ and the label texts in the export are not sized as expected.

You can modify and finetune the appearance of the Chart labels via the labels configuration option:

https://www.telerik.com/kendo-angular-ui/components/charts/api/LegendLabels/

Providing the expected DejaVu Sans font to the Labels configuration yields the expected behavior of exporting the Chart labels the same way they are observed on the screen:

https://plnkr.co/edit/ohGDsbnKUkHDCOfVgEZo?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Xavier
Top achievements
Rank 1
answered on 23 Jul 2020, 07:55 AM
I resolved setting Spacing value, like this:.Legend(
        legend => legend
            .Orientation(ChartLegendOrientation.Horizontal)
            .Position(ChartLegendPosition.Top)
            .Labels(x=>x.Font("20px"))
            .Spacing(70)
            )

 

Tags
General Discussions
Asked by
Angelo
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Xavier
Top achievements
Rank 1
Share this question
or