5 Answers, 1 is accepted
0
Hello, David,
Thank you for the details.
This could be achieved using the function for the labels color and the font as currently, placing HTML tag inside the template is not supported.
More details and an example can be found here:
https://stackoverflow.com/questions/35124802/kendo-chart-template-with-label-show-html-tag-inside
I hope this is helpful.
Regards,
Stefan
Progress Telerik
Thank you for the details.
This could be achieved using the function for the labels color and the font as currently, placing HTML tag inside the template is not supported.
More details and an example can be found here:
https://stackoverflow.com/questions/35124802/kendo-chart-template-with-label-show-html-tag-inside
I hope this is helpful.
Regards,
Stefan
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
David
Top achievements
Rank 2
answered on 11 Jun 2018, 01:54 PM
However the return value of the function would modify the whole template. i should be more clear. I want only parts of the template to be styled, specifically what is between the <b> tags. everything else I want to receive no styling
0
Hello, David,
Thank you for the clarification.
This could require using a custom visual function to be used:
https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/categoryaxis.labels#categoryAxis.labels.visual
The text can be split and then based on the value to set a specific color to the element:
https://dojo.telerik.com/OZUpiZOT
Regards,
Stefan
Progress Telerik
Thank you for the clarification.
This could require using a custom visual function to be used:
https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/categoryaxis.labels#categoryAxis.labels.visual
The text can be split and then based on the value to set a specific color to the element:
https://dojo.telerik.com/OZUpiZOT
Regards,
Stefan
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
David
Top achievements
Rank 2
answered on 13 Jun 2018, 01:14 PM
However this would change font for all text in the template. I need something that will only bold a specific part
It seems like the tool tip's template can support html tags. https://dojo.telerik.com/oWadIRoh
The tool tip uses <b> tags. I pretty much want to bold a specific text in the template.
0
Hello, David,
The category and value axis do not support HTML templates. They did support it before but due to security reasons, the support was removed.
Also, the previously suggested approach with labels.visual is using the Text drawing element which can accept font properties to achieve the bold effect:
https://docs.telerik.com/kendo-ui/api/javascript/drawing/text/configuration/font
Regards,
Stefan
Progress Telerik
The category and value axis do not support HTML templates. They did support it before but due to security reasons, the support was removed.
Also, the previously suggested approach with labels.visual is using the Text drawing element which can accept font properties to achieve the bold effect:
https://docs.telerik.com/kendo-ui/api/javascript/drawing/text/configuration/font
Regards,
Stefan
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.