ChartCategoryAxisLabels HTML Template

1 Answer 324 Views
Charts Styling
Oleg
Top achievements
Rank 1
Oleg asked on 07 Jun 2021, 08:35 AM

Is there any way to place HTML code into Template for category-axis?

Documentation suggests one way like this:

<ChartCategoryAxisLabels Template="#=value#"></ChartCategoryAxisLabels>

But I need  to realize more complicated tasks. For example, show image instead of simple text (place url into on of the categories and then show it through <img> tag). Now, I сouldn't do anything more than:

<ChartCategoryAxes>
  <ChartCategoryAxis Name="chartCategories" Categories="@NumberCategoriesData"></ChartCategoryAxis>
  <ChartCategoryAxis Name="pictureCategories" Categories="@PictureCategoriesData">
         <ChartCategoryAxisLabels Template="#=value#"></ChartCategoryAxisLabels>
   </ChartCategoryAxis>
</ChartCategoryAxes>
<ChartValueAxes>
   <ChartValueAxis AxisCrossingValue="@crossingPoints"></ChartValueAxis>
</ChartValueAxes>
If there isn't more options to solve this approach, is it already planned to add or not?

1 Answer, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 09 Jun 2021, 06:36 PM

Hi Oleg,

At this time, the Label Templates can only contain plain-text as outlined in the Chart Label Templates documentation. 

As a result, I have gone ahead and created a feature request for this which can be found at Allow Html Code in Label Template request.

Additionally, I have cast a vote on your behalf which will increase the priority of the item. I encourage following it to receive future status updates. 

In the meantime, please let me know if you need any additional information. Thank you for using the UI for Blazor forums and providing the feedback.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Oleg
Top achievements
Rank 1
commented on 10 Jun 2021, 02:56 AM

Thanks a lot for your support!
Tags
Charts Styling
Asked by
Oleg
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Share this question
or