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

Export as PDF

10 Answers 92 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Dragos
Top achievements
Rank 1
Dragos asked on 25 May 2016, 10:29 AM

Hello guys,

I have some charts with legend set as false, but when i export the PDF i want to be able to export the legend on the bottom of the chart also.

Is that possible, can someone assist me with this issue.

Any help is much appreciated.

 

Thank you.

10 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 27 May 2016, 10:49 AM
Hello Dragos,

You can configure the legend position to "bottom", and handle the render event of the Kendo UI Chart to find and hide the legend programmatically. It will not be visible on the page, but will still appear in the exported PDF. Here is a sample implementation:

http://dojo.telerik.com/UyepU/2

I hope this helps.

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dragos
Top achievements
Rank 1
answered on 27 May 2016, 11:08 AM

Thank you very much for this great answer.

Best.

0
Dragos
Top achievements
Rank 1
answered on 30 May 2016, 01:39 PM
Dimiter what if i renderAs: canvas; How do i do it then ?
0
Dimiter Topalov
Telerik team
answered on 31 May 2016, 10:13 AM
Hi Dragos,

You can use the following workaround, that works the same, regardless of the rendering engine, set in the options:

http://dojo.telerik.com/UyepU/5

It is based around creating a new chart with the same options, except legend.visible, and transitions, in a hidden element, saving it as a PDF, and then destroying it.

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dragos
Top achievements
Rank 1
answered on 22 Jun 2016, 11:15 AM

I have a question.

 

Is there any way of achieving something like this. I have attached a picture.

On any of the bars i must be able to render as much as 5 stacked segments with different colors, and i must have at least 3 separate bars.

I have tried with no success the stacked bars charts and the bullet charts.

 

Any indications are most appreciated.

Thanks.

0
Dimiter Topalov
Telerik team
answered on 24 Jun 2016, 07:39 AM
Hi Dragos,

Based on the provided information, the stacked bars, or grouped and stacked bars charts (depending on the scenario), seem the most appropriate choice:

http://demos.telerik.com/kendo-ui/bar-charts/stacked-bar

http://demos.telerik.com/kendo-ui/bar-charts/grouped-stacked-bar

You can also check out the following how-to article from our documentation on implementing color-coded ranges in bars:

http://docs.telerik.com/kendo-ui/controls/charts/how-to/color-coded-bars

I hope this helps.

On a side note, could you please open a separate thread for questions or issues that are not directly connected to the ones in the initial post? This will help us to better systematize the support process, and improve the service as a whole. Thank you in advance.

Regards,
Dimiter Topalov
Telerik
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
0
Dragos
Top achievements
Rank 1
answered on 24 Jun 2016, 02:39 PM

Hello,

Can you please provide me with a custom example like in my picture. I will explain again.

I have 3 bars ( the 1st one will need to pragmatically contains up to 7 stacked bars , the 2nd one will be just one value and the 3rd one will be like the same ). All the 7 stacked bars will have to separate values and colors except for the second which will just be blue for example. I hope this makes more sense.

 

haven't opened a new post because i had no idea where to include my question.

A simple example will suffice.

Thanks.

0
Dragos
Top achievements
Rank 1
answered on 24 Jun 2016, 02:44 PM
i have attached a picture
0
Dragos
Top achievements
Rank 1
answered on 24 Jun 2016, 02:44 PM
i have attached a second picture
0
Dimiter Topalov
Telerik team
answered on 28 Jun 2016, 07:54 AM
Hi Dragos,

You can customize the stacked bars' colors via the series.colorField option:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-series.colorField

... and define the desired colors for each series.data, as shown in the following dojo:

http://dojo.telerik.com/UdoNA

I hope this helps.

Regards,
Dimiter Topalov
Telerik
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
Charts
Asked by
Dragos
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Dragos
Top achievements
Rank 1
Share this question
or