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

How to create tooltip template conditionally using kendo stacked column chart using angular js

5 Answers 616 Views
Charts
This is a migrated thread and some comments may be shown as answers.
developer
Top achievements
Rank 1
developer asked on 15 Jul 2016, 06:55 AM

Hi..

I created kendo stacked column chart in my project using angular js. im giving condition tool tip template. here is the dojo example http://dojo.telerik.com/aZEgu

 

 

5 Answers, 1 is accepted

Sort by
0
developer
Top achievements
Rank 1
answered on 15 Jul 2016, 06:58 AM

Hi..
I created kendo stacked column chart in my project using angular js. im giving condition tool tip template. here is the dojo example http://dojo.telerik.com/aZEgu.tooltip is not disaplying with conditional tooltip template.

Kindly help to resolve the issue.

Thanks in advance

 

0
Alex Hajigeorgieva
Telerik team
answered on 18 Jul 2016, 03:55 PM
Hello,

To fix the Kendo UI Chart Tooltip in the code provided, place the string values in quotes so that they can be evaluated against the series name and escape them like below:

k-tooltip="{visible:true,template :'#= series.name #(#= series.name == \'Verified\' ? dataItem.verified :series.name == \'Unverified\' ? dataItem.unverified:series.name == \'Non Compliant\' ? dataItem.nonCompliant:0 #): #= value #%'}"

Regards,
Alex
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
developer
Top achievements
Rank 1
answered on 20 Jul 2016, 08:47 AM

Hi Alex..

Thank you for your reply , it's working.

I'm facing issue with reduce the gap between two columns in a chart i'm using gap property.if i reduce gap columns width is getting increase how to reduce the space or gap between columns

 

0
developer
Top achievements
Rank 1
answered on 20 Jul 2016, 08:48 AM

Hi..

I'm expecting chart to be displayed in shared image file.

Thank you in advance

0
Alex Hajigeorgieva
Telerik team
answered on 22 Jul 2016, 11:31 AM
Hi,

The gap property of the Kendo UI Chart series and  defaultSeries  is the correct property to use:

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

It can also be assigned to the seriesDefaults property:

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

In the example provided, the columns are created based on the category name. Since there are only two categories, then the available space is equally split between them, therefore it looks as if there is a big gap between them. I added more columns to the Kendo UI Chart to demonstrate how the chart changes its visualisation. It is available at: 

http://dojo.telerik.com/ONiyO

I am not certain what is the expected behaviour. Could you please elaborate? 

Finally, this thread is no longer concerning the Tooltip template for the Kendo UI Chart in an AngularJS application and I would recommend opening another thread so we can keep the related topics tidy.

Thank you for your understanding.

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